Revert "Call configureJvmProject once per project in afterEvaluate"
This reverts commit 33de71f7
This commit is contained in:
+6
-2
@@ -339,6 +339,8 @@ 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",
|
||||||
@@ -379,8 +381,10 @@ allprojects {
|
|||||||
task("listDistJar") { listConfigurationContents("distJar") }
|
task("listDistJar") { listConfigurationContents("distJar") }
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
logger.info("configuring project $name to compile to the target jvm version $jvmTarget using jdk: $javaHome")
|
if (javaHome != defaultJavaHome || jvmTarget != defaultJvmTarget) {
|
||||||
configureJvmProject(javaHome!!, jvmTarget!!)
|
logger.info("configuring project $name to compile to the target jvm version $jvmTarget using jdk: $javaHome")
|
||||||
|
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