Build: Extract toolchain resolve into a separate task
#KTI-72
This commit is contained in:
committed by
Space Team
parent
49814ecb8a
commit
7d96623c37
+11
-6
@@ -22,12 +22,6 @@ tasks.register("resolveDependencies") {
|
||||
|
||||
configurations.findByName("commonCompileClasspath")?.resolve()
|
||||
|
||||
plugins.withId("java-base") {
|
||||
val service = project.extensions.getByType<JavaToolchainService>()
|
||||
val javaExtension = extensions.getByType<JavaPluginExtension>()
|
||||
service.compilerFor(javaExtension.toolchain).get()
|
||||
}
|
||||
|
||||
project.extensions.findByType<SpdxSbomExtension>()?.run {
|
||||
targets.forEach { target ->
|
||||
target.configurations.get().forEach { configurationName ->
|
||||
@@ -75,4 +69,15 @@ tasks.register("resolveDependencies") {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("resolveToolchains") {
|
||||
allprojects {
|
||||
logger.info("Resolving toolchains in $this")
|
||||
plugins.withId("java-base") {
|
||||
val service = project.extensions.getByType<JavaToolchainService>()
|
||||
val javaExtension = extensions.getByType<JavaPluginExtension>()
|
||||
service.compilerFor(javaExtension.toolchain).get()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user