update for build
This commit is contained in:
		
							parent
							
								
									ff134c6d51
								
							
						
					
					
						commit
						5fec236aa4
					
				
							
								
								
									
										6
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -24,11 +24,13 @@ jobs:
 | 
				
			|||||||
          distribution: 'adopt'
 | 
					          distribution: 'adopt'
 | 
				
			||||||
      - name: Setup Gradle
 | 
					      - name: Setup Gradle
 | 
				
			||||||
        uses: gradle/gradle-build-action@v2
 | 
					        uses: gradle/gradle-build-action@v2
 | 
				
			||||||
#      Not sure why this is needed, per a support issue (https://github.com/gradle/gradle-build-action/issues/517) it should not
 | 
					# Not sure why this is needed, per a support issue (https://github.com/gradle/gradle-build-action/issues/517) it should not
 | 
				
			||||||
      - name: Grant execute permission for gradlew
 | 
					      - name: Grant execute permission for gradlew
 | 
				
			||||||
        run: chmod +x gradlew
 | 
					        run: chmod +x gradlew
 | 
				
			||||||
      - name: Execute Gradle build
 | 
					      - name: Execute Gradle build
 | 
				
			||||||
        run: ./gradlew clean serializeEnginesDist build dist
 | 
					        run: ./gradlew clean build dist
 | 
				
			||||||
 | 
					# If wanting to serialize all the engines during build
 | 
				
			||||||
 | 
					#        run: ./gradlew clean serializeEnginesDist build dist
 | 
				
			||||||
      - name: Upload build reports
 | 
					      - name: Upload build reports
 | 
				
			||||||
        uses: actions/upload-artifact@v3
 | 
					        uses: actions/upload-artifact@v3
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -26,7 +26,6 @@
 | 
				
			|||||||
/core/build
 | 
					/core/build
 | 
				
			||||||
/core/tmp
 | 
					/core/tmp
 | 
				
			||||||
/core/misc
 | 
					/core/misc
 | 
				
			||||||
/core/src/main/resources/datafiles/thrustcurves/thrustcurves.ser
 | 
					 | 
				
			||||||
/core/src/main/resources/ReleaseNotes.md
 | 
					/core/src/main/resources/ReleaseNotes.md
 | 
				
			||||||
/core/src/test/resources/ReleaseNotes.md
 | 
					/core/src/test/resources/ReleaseNotes.md
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,7 @@ jdk:
 | 
				
			|||||||
  - oraclejdk13
 | 
					  - oraclejdk13
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
script:
 | 
					script:
 | 
				
			||||||
  - gradlew clean serializeEnginesDist build dist
 | 
					  - gradlew clean build dist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
notifications:
 | 
					notifications:
 | 
				
			||||||
    webhooks: https://www.travisbuddy.com/
 | 
					    webhooks: https://www.travisbuddy.com/
 | 
				
			||||||
 | 
				
			|||||||
@ -112,6 +112,21 @@ tasks.register('serializeEnginesExecuteDist', JavaExec) {
 | 
				
			|||||||
        println "...serializeEnginesExecuteDist Completed"
 | 
					        println "...serializeEnginesExecuteDist Completed"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					// Validates that the serialize engines file exists.
 | 
				
			||||||
 | 
					tasks.register('serializeEnginesValidate') {
 | 
				
			||||||
 | 
					    group = 'openrocket'
 | 
				
			||||||
 | 
					    if (!project.file(serializedEnginesPath).exists()) {
 | 
				
			||||||
 | 
					        def message = "The serialized engine file does not exist at the following location:\n${project.file(serializedEnginesPath)}.\n" +
 | 
				
			||||||
 | 
					                "You will need to run the following from the command line in order to generate the serialized engine file:\n"
 | 
				
			||||||
 | 
					                "% ./gradlew serializeEngines\n" +
 | 
				
			||||||
 | 
					                "\n";
 | 
				
			||||||
 | 
					            println message
 | 
				
			||||||
 | 
					            throw new GradleException('Invalid serialized engine file.')
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        def message = "Serialized engine file found.\n\n";
 | 
				
			||||||
 | 
					        println message
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tasks.register('copyReadmeMain', Copy) {
 | 
					tasks.register('copyReadmeMain', Copy) {
 | 
				
			||||||
    doLast {
 | 
					    doLast {
 | 
				
			||||||
@ -122,9 +137,8 @@ tasks.register('copyReadmeMain', Copy) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//clean.dependsOn([serializeEnginesDelete])
 | 
					 | 
				
			||||||
processResources.dependsOn([copyReadmeMain])
 | 
					processResources.dependsOn([copyReadmeMain])
 | 
				
			||||||
//jar.dependsOn([serializeEnginesExecute])
 | 
					processResources.dependsOn([serializeEnginesValidate])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// https://docs.gradle.org/7.4/userguide/cross_project_publications.html
 | 
					// https://docs.gradle.org/7.4/userguide/cross_project_publications.html
 | 
				
			||||||
tasks.register('testCoreArtifactsJar', Jar) {
 | 
					tasks.register('testCoreArtifactsJar', Jar) {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								core/src/main/resources/datafiles/thrustcurves/thrustcurves.ser
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								core/src/main/resources/datafiles/thrustcurves/thrustcurves.ser
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@ -92,30 +92,25 @@ tasks.register('externalComponentsValidate') {
 | 
				
			|||||||
    def externalResourceComponents = './resources-src/datafiles/components-dbcook/orc';
 | 
					    def externalResourceComponents = './resources-src/datafiles/components-dbcook/orc';
 | 
				
			||||||
    def git = '../.git';
 | 
					    def git = '../.git';
 | 
				
			||||||
    if (!project.file(externalResourceComponents).exists()) {
 | 
					    if (!project.file(externalResourceComponents).exists()) {
 | 
				
			||||||
        println "found: ${project.file(externalResourceComponents)}"
 | 
					//        println "found: ${project.file(externalResourceComponents)}"
 | 
				
			||||||
        def message = "The component database is now a submodule, and must be included into\n" +
 | 
					        def message = "The component database is now a submodule, and must be included into " +
 | 
				
			||||||
                "this project to compile and run the app.\n" +
 | 
					            "this project to compile and run the app.\n" +
 | 
				
			||||||
                "\n";
 | 
					            "\n";
 | 
				
			||||||
        if (project.file(git).exists()) {
 | 
					        if (project.file(git).exists()) {
 | 
				
			||||||
            message +=
 | 
					            message +="If you retrieved this code by cloning the openrocket repository, " +
 | 
				
			||||||
                    "If you retrieved this code by cloning the openrocket repository, \n" +
 | 
					                "the Gradle build will initialize the submodule if missing.\n" +
 | 
				
			||||||
                    "the Gradle build will initialize the submodule if missing.\n" +
 | 
					                "\n" +
 | 
				
			||||||
                    "\n" +
 | 
					                "You can also manually initialize and update the submodule from the command line\n" +
 | 
				
			||||||
                    "You can also manually initialize and update the submodule from the \n" +
 | 
					                "% git submodule init\n" +
 | 
				
			||||||
                    "command line\n" +
 | 
					                "% git submodule update --remote\n" +
 | 
				
			||||||
                    "% git submodule init\n" +
 | 
					                "\n";
 | 
				
			||||||
                    "% git submodule update --remote\n" +
 | 
					 | 
				
			||||||
                    "\n";
 | 
					 | 
				
			||||||
            println message
 | 
					            println message
 | 
				
			||||||
            dependsOn subModuleUpdate
 | 
					            dependsOn subModuleUpdate
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            message +=
 | 
					            message += "If you retrieved this code by downloading and uncompressing a zip file,\n" +
 | 
				
			||||||
                    "If you retrieved this code by downloading and uncompressing a zip file,\n" +
 | 
					                "Download the code from https://github.com/dbcook/openrocket-database and uncompress it.\n" +
 | 
				
			||||||
                    "Download the code\n" +
 | 
					                "Copy the files and directories under openrocket-database-master into ''./swing/${externalResourceComponents}''\n" +
 | 
				
			||||||
                    "from https://github.com/dbcook/openrocket-database and uncompress it.\n" +
 | 
					                "\n";
 | 
				
			||||||
                    "Copy the files and directories under openrocket-database-master\n" +
 | 
					 | 
				
			||||||
                    "into ''./swing/${externalResourceComponents}''\n" +
 | 
					 | 
				
			||||||
                    "\n";
 | 
					 | 
				
			||||||
            println message
 | 
					            println message
 | 
				
			||||||
            throw new GradleException('Invalid external component resources.')
 | 
					            throw new GradleException('Invalid external component resources.')
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user