update for build
This commit is contained in:
		
							parent
							
								
									ff134c6d51
								
							
						
					
					
						commit
						5fec236aa4
					
				
							
								
								
									
										4
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -28,7 +28,9 @@ jobs:
 | 
			
		||||
      - name: Grant execute permission for gradlew
 | 
			
		||||
        run: chmod +x gradlew
 | 
			
		||||
      - 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
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -26,7 +26,6 @@
 | 
			
		||||
/core/build
 | 
			
		||||
/core/tmp
 | 
			
		||||
/core/misc
 | 
			
		||||
/core/src/main/resources/datafiles/thrustcurves/thrustcurves.ser
 | 
			
		||||
/core/src/main/resources/ReleaseNotes.md
 | 
			
		||||
/core/src/test/resources/ReleaseNotes.md
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@ jdk:
 | 
			
		||||
  - oraclejdk13
 | 
			
		||||
 
 | 
			
		||||
script:
 | 
			
		||||
  - gradlew clean serializeEnginesDist build dist
 | 
			
		||||
  - gradlew clean build dist
 | 
			
		||||
 | 
			
		||||
notifications:
 | 
			
		||||
    webhooks: https://www.travisbuddy.com/
 | 
			
		||||
 | 
			
		||||
@ -112,6 +112,21 @@ tasks.register('serializeEnginesExecuteDist', JavaExec) {
 | 
			
		||||
        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) {
 | 
			
		||||
    doLast {
 | 
			
		||||
@ -122,9 +137,8 @@ tasks.register('copyReadmeMain', Copy) {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//clean.dependsOn([serializeEnginesDelete])
 | 
			
		||||
processResources.dependsOn([copyReadmeMain])
 | 
			
		||||
//jar.dependsOn([serializeEnginesExecute])
 | 
			
		||||
processResources.dependsOn([serializeEnginesValidate])
 | 
			
		||||
 | 
			
		||||
// https://docs.gradle.org/7.4/userguide/cross_project_publications.html
 | 
			
		||||
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,29 +92,24 @@ tasks.register('externalComponentsValidate') {
 | 
			
		||||
    def externalResourceComponents = './resources-src/datafiles/components-dbcook/orc';
 | 
			
		||||
    def git = '../.git';
 | 
			
		||||
    if (!project.file(externalResourceComponents).exists()) {
 | 
			
		||||
        println "found: ${project.file(externalResourceComponents)}"
 | 
			
		||||
        def message = "The component database is now a submodule, and must be included into\n" +
 | 
			
		||||
//        println "found: ${project.file(externalResourceComponents)}"
 | 
			
		||||
        def message = "The component database is now a submodule, and must be included into " +
 | 
			
		||||
            "this project to compile and run the app.\n" +
 | 
			
		||||
            "\n";
 | 
			
		||||
        if (project.file(git).exists()) {
 | 
			
		||||
            message +=
 | 
			
		||||
                    "If you retrieved this code by cloning the openrocket repository, \n" +
 | 
			
		||||
            message +="If you retrieved this code by cloning the openrocket repository, " +
 | 
			
		||||
                "the Gradle build will initialize the submodule if missing.\n" +
 | 
			
		||||
                "\n" +
 | 
			
		||||
                    "You can also manually initialize and update the submodule from the \n" +
 | 
			
		||||
                    "command line\n" +
 | 
			
		||||
                "You can also manually initialize and update the submodule from the command line\n" +
 | 
			
		||||
                "% git submodule init\n" +
 | 
			
		||||
                "% git submodule update --remote\n" +
 | 
			
		||||
                "\n";
 | 
			
		||||
            println message
 | 
			
		||||
            dependsOn subModuleUpdate
 | 
			
		||||
        } else {
 | 
			
		||||
            message +=
 | 
			
		||||
                    "If you retrieved this code by downloading and uncompressing a zip file,\n" +
 | 
			
		||||
                    "Download the code\n" +
 | 
			
		||||
                    "from https://github.com/dbcook/openrocket-database and uncompress it.\n" +
 | 
			
		||||
                    "Copy the files and directories under openrocket-database-master\n" +
 | 
			
		||||
                    "into ''./swing/${externalResourceComponents}''\n" +
 | 
			
		||||
            message += "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" +
 | 
			
		||||
                "Copy the files and directories under openrocket-database-master into ''./swing/${externalResourceComponents}''\n" +
 | 
			
		||||
                "\n";
 | 
			
		||||
            println message
 | 
			
		||||
            throw new GradleException('Invalid external component resources.')
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user