|
1 | 1 | import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar |
2 | 2 |
|
| 3 | +// afterEvaluate ensures these dependencies are passed to projects applying this plugin, not this plugin itself |
| 4 | +project.afterEvaluate { |
| 5 | + dependencies { |
| 6 | + annotationProcessor findProject(':procedural:processor') ?: "gov.nasa.ammos.aerie.procedural:processor:${findProperty("aerieVersion")}" |
| 7 | + implementation findProject(':procedural:constraints') ?: "gov.nasa.ammos.aerie.procedural:constraints:${findProperty("aerieVersion")}" |
| 8 | + implementation findProject(':procedural:scheduling') ?: "gov.nasa.ammos.aerie.procedural:scheduling:${findProperty("aerieVersion")}" |
| 9 | + implementation findProject(':procedural:timeline') ?: "gov.nasa.ammos.aerie.procedural:timeline:${findProperty("aerieVersion")}" |
| 10 | + implementation findProject(':merlin-driver') ?: "gov.nasa.jpl.aerie:merlin-driver:${findProperty("aerieVersion")}" |
| 11 | + implementation findProject(':type-utils') ?: "gov.nasa.jpl.aerie:type-utils:${findProperty("aerieVersion")}" |
| 12 | + implementation findProject(':contrib') ?: "gov.nasa.jpl.aerie:contrib:${findProperty("aerieVersion")}" |
| 13 | + } |
| 14 | +} |
| 15 | + |
3 | 16 | tasks.register('buildAllSchedulingProcedureJars') { |
4 | 17 | group = 'SchedulingProcedureJars' |
5 | 18 |
|
@@ -28,16 +41,16 @@ tasks.create("generateSchedulingProcedureJarTasks") { |
28 | 41 |
|
29 | 42 | files.toList().each { file -> |
30 | 43 | final nameWithoutExtension = file.name.replace(".java", "") |
| 44 | + final jarPath = nameWithoutExtension + ".jar" |
31 | 45 | final taskName = "buildSchedulingProcedureJar_${nameWithoutExtension}" |
32 | 46 |
|
33 | | - println "Generating ${taskName} task, which will build ${nameWithoutExtension}.jar" |
| 47 | + println "Generating ${taskName} task, which will build ${jarPath}" |
34 | 48 |
|
35 | 49 | tasks.create(taskName, ShadowJar) { |
36 | 50 | group = 'SchedulingProcedureJars' |
37 | | - configurations = [project.configurations.compileClasspath] |
| 51 | + configurations = [project.configurations.runtimeClasspath] |
38 | 52 | from sourceSets.main.output |
39 | | - archiveBaseName = "" // clear |
40 | | - archiveClassifier.set(nameWithoutExtension) // set output jar name |
| 53 | + archiveFileName = jarPath |
41 | 54 | manifest { |
42 | 55 | attributes 'Main-Class': getMainClassFromGeneratedFile(file) |
43 | 56 | } |
|
0 commit comments