Call configureJvmProject once per project in afterEvaluate

Calling it twice does not seem to make sense now
This commit is contained in:
Alexey Tsvetkov
2019-06-10 20:51:11 +03:00
parent 290aded94f
commit 33de71f792

View File

@@ -339,8 +339,6 @@ allprojects {
internalKotlinRepo?.let(::maven)
}
configureJvmProject(javaHome!!, jvmTarget!!)
val commonCompilerArgs = listOfNotNull(
"-Xallow-kotlin-package",
"-Xread-deserialized-contracts",
@@ -381,10 +379,8 @@ allprojects {
task("listDistJar") { listConfigurationContents("distJar") }
afterEvaluate {
if (javaHome != defaultJavaHome || jvmTarget != defaultJvmTarget) {
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
logger.info("configuring project $name to compile to the target jvm version $jvmTarget using jdk: $javaHome")
configureJvmProject(javaHome!!, jvmTarget!!)
fun File.toProjectRootRelativePathOrSelf() = (relativeToOrNull(rootDir)?.takeUnless { it.startsWith("..") } ?: this).path