This commit is contained in:
thzero 2023-05-05 18:57:55 -05:00
parent 8ff32dff14
commit 06c1e29794
3 changed files with 9 additions and 3 deletions

View File

@ -48,6 +48,8 @@ shadowJar {
//shadowJar.dependsOn([':core:serializeEngines'])
// Runs a build of the application. This does not include executions of the
// serialization of engines.
tasks.register('deploy') {
group = 'openrocket'
dependsOn 'shadowJar'
@ -55,6 +57,8 @@ tasks.register('deploy') {
println "Completed the deployable jar in './build/libs"
}
}
// Runs a complete build of the application. This includes executions the
// serialization of engines by fetching data from ThrustCurve.
tasks.register('deployFull') {
group = 'openrocket'
dependsOn ':core:serializeEngines', 'shadowJar'

View File

@ -54,10 +54,12 @@ dependencies {
}
def serializedEnginesPath = './src/main/resources/datafiles/thrustcurves/thrustcurves.ser'
// Deletes the serialize engine file if it exists.
tasks.register('serializeEnginesDelete', Delete) {
group = 'openrocket'
delete fileTree(serializedEnginesPath)
}
// Executes the serialization of engines from ThrustCurve.
tasks.register('serializeEngines') {
group = 'openrocket'
if (!project.file(serializedEnginesPath).exists()) {
@ -65,7 +67,7 @@ tasks.register('serializeEngines') {
dependsOn serializeEnginesExecute
}
else {
println 'Serialized engines in ${project.file(serializedEnginesPath)} already exist.'
println "Serialized engines in ${project.file(serializedEnginesPath)} already exist."
}
}
tasks.register('serializeEnginesExecute', JavaExec) {
@ -85,7 +87,7 @@ tasks.register('copyReadmeMain', Copy) {
}
}
clean.dependsOn([serializeEnginesDelete])
//clean.dependsOn([serializeEnginesDelete])
compileJava.dependsOn([copyReadmeMain])
// https://docs.gradle.org/7.4/userguide/cross_project_publications.html

View File

@ -99,7 +99,7 @@ tasks.register('externalComponentsValidate') {
def externalResourceComponents = './resources-src/datafiles/components-dbcook/orc';
def git = '../.git';
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" +
"this project to compile and run the app.\n" +
"\n";