HS
10/22/2024, 2:09 PMThomas Broyer
10/22/2024, 2:27 PMfrom(sourceSets.main.get().output)
tasks {
register<Jar>("assemblyPackageDependency") {
archiveClassifier = "dependencies"
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}
}
You can also change it as:
tasks {
val assemblyPackageDependency by registering(Jar::class) {
// same as above
}
assemble { dependsOn(assemblyPackageDependency) }
}
so a ./gradlew assemble will build both JARsmelix
10/22/2024, 2:48 PMmelix
10/22/2024, 2:49 PMmelix
10/22/2024, 2:49 PMVampire
10/22/2024, 2:59 PMapplication plugin instead. 😄melix
10/22/2024, 3:00 PMmelix
10/22/2024, 3:00 PMVampire
10/22/2024, 3:01 PMHS
10/22/2024, 3:08 PMmelix
10/22/2024, 3:09 PMVampire
10/22/2024, 3:14 PM