Call configureJvmProject once per project in afterEvaluate
Calling it twice does not seem to make sense now
This commit is contained in:
+2
-6
@@ -339,8 +339,6 @@ allprojects {
|
|||||||
internalKotlinRepo?.let(::maven)
|
internalKotlinRepo?.let(::maven)
|
||||||
}
|
}
|
||||||
|
|
||||||
configureJvmProject(javaHome!!, jvmTarget!!)
|
|
||||||
|
|
||||||
val commonCompilerArgs = listOfNotNull(
|
val commonCompilerArgs = listOfNotNull(
|
||||||
"-Xallow-kotlin-package",
|
"-Xallow-kotlin-package",
|
||||||
"-Xread-deserialized-contracts",
|
"-Xread-deserialized-contracts",
|
||||||
@@ -381,10 +379,8 @@ allprojects {
|
|||||||
task("listDistJar") { listConfigurationContents("distJar") }
|
task("listDistJar") { listConfigurationContents("distJar") }
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
if (javaHome != defaultJavaHome || jvmTarget != defaultJvmTarget) {
|
logger.info("configuring project $name to compile to the target jvm version $jvmTarget using jdk: $javaHome")
|
||||||
logger.info("configuring project $name to compile to the target jvm version $jvmTarget using jdk: $javaHome")
|
configureJvmProject(javaHome!!, jvmTarget!!)
|
||||||
configureJvmProject(javaHome!!, jvmTarget!!)
|
|
||||||
} // else we will actually fail during the first task execution. We could not fail before configuration is done due to impact on import in IDE
|
|
||||||
|
|
||||||
fun File.toProjectRootRelativePathOrSelf() = (relativeToOrNull(rootDir)?.takeUnless { it.startsWith("..") } ?: this).path
|
fun File.toProjectRootRelativePathOrSelf() = (relativeToOrNull(rootDir)?.takeUnless { it.startsWith("..") } ?: this).path
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user