Slackbot
10/11/2023, 3:38 PMephemient
10/11/2023, 6:14 PMEric Ortega
10/11/2023, 6:16 PMEric Ortega
10/11/2023, 6:16 PMEric Ortega
10/11/2023, 6:25 PMEric Ortega
10/11/2023, 6:26 PMconfigurations {
fatBoot {
canBeConsumed = true
canBeResolved = false
attributes {
attribute(Attribute.of("is.springboot", String), 'true')
}
}
fatBootJava8 {
canBeConsumed = true
canBeResolved = false
attributes {
attribute(Attribute.of("is.springbootjava8", String), 'true')
}
}
}
...
artifacts {
fatBoot(bootJar.archivePath) {
builtBy(bootJar)
}
fatBootJava8 jarJava8
}
Eric Ortega
10/11/2023, 6:28 PMEric Ortega
10/11/2023, 6:29 PMconfigurations {
testInputSpringBootJars {
attributes {
attribute(Attribute.of("is.springboot", String), 'true')
}
}
testInputSpringBootJava8Jars {
attributes {
attribute(Attribute.of("is.springbootjava8", String), 'true')
}
}
}
...
dependencies {
testInputSpringBootJars "com.pjrcorp:SpringBoot:+@jar"
testInputSpringBootJava8Jars "com.pjrcorp:SpringBoot:+@jar:java8"
}
...
task copySpringBootJars(type: Copy) {
from configurations.testInputSpringBootJars
into sourceSets.test.output.resourcesDir
}
task copySpringBootJava8Jars(type: Copy) {
from configurations.testInputSpringBootJava8Jars
into sourceSets.test.output.resourcesDir
}
Eric Ortega
10/11/2023, 6:33 PMdependsOn
both of those tasks:
> Task :copySpringBootJars NO-SOURCE
> Task :copySpringBootJava8Jars
Eric Ortega
10/11/2023, 6:35 PMgradle copySpringBootJars
it copies what I expect overEric Ortega
10/11/2023, 6:35 PMEric Ortega
10/11/2023, 6:55 PM--info
it seems like the non-java8 version is hardly being addressed at all, I'm not sure why there is a collisionEric Ortega
10/11/2023, 6:59 PMdependsOn copySpringBootJava8Jars
then the non-java8 version is built and copied over ... it seems like, somehow, both tasks are able to satisfy the other (?) so only one is run ... just guessing hereEric Ortega
10/11/2023, 7:19 PMEric Ortega
10/11/2023, 7:27 PMEric Ortega
10/11/2023, 8:11 PMEric Ortega
10/11/2023, 8:59 PMtasks.register("bootJarN", BootJar.class) {
group = bootJar.group
description = bootJar.description
classpath = bootJar.classpath
mainClass = bootJar.mainClass
}