build.gradle.kts:
import org.gradle.kotlin.dsl.support.kotlinEap
buildscript {
repositories {
kotlinEap()
}
}
tasks.withType<Wrapper> {
gradleVersion = "4.10.2"
}
command line:
➜ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
➜ ./gradlew tasks
> Configure project :
e: PROJECT_DIR/build.gradle.kts:7:5: Unresolved reference: kotlinEap
FAILURE: Build failed with an exception.
* Where:
Build file 'PROJECT_DIR/build.gradle.kts' line: 7
* What went wrong:
Script compilation error:
Line 7: kotlinEap()
^ Unresolved reference: kotlinEap
Don't know if that is expected 🤔
This commit says move kotlinEap() to internals.
Maybe it is a wanted braking change which was not documented in release notes? 🤔
cc @eskatos
@StefMa kotlinEap() was introduced in 1.0-RC1 with Gradle 4.10 as internal from the start. This commit is a simple move right after https://github.com/gradle/kotlin-dsl/commit/3b07ab2383ebe06f0d05cf0e6c70d9993713ae43.
@BorzdeG, kotlinEap() is internal and subject to change, please declare the repository explicitly:
repositories {
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap/")
}
It's a pity. It would be desirable, that it was possible to specify as "jcenter()", "google()" or "gradlePluginPortal()"
@BorzdeG, if you feel strongly about it, please open a feature request on the kotlin-gradle-plugin. It doesn't belong in the Gradle Kotlin DSL api.
I'm not sure if it makes sense to provide those aliases in the Kotlin Gradle plugin, because in this case they won't be availabile until the plugin is applied, i.e. in the buildscript block and the settings.gradle script. In those places, you will anyway need to specify the full repository URLs.
@h0tk3y and how, for example, mavenCentral(), which also does not apply by default, but is present as an alias?
I'm not sure if it makes sense to provide those aliases in the Kotlin Gradle plugin, because in this case they won't be availabile until the plugin is applied, i.e. in the buildscript block and the settings.gradle script. In those places, you will anyway need to specify the full repository URLs.
Yes, that is correct.
But what is the benefit of adding the kotlinEap() repo as dependency-repository without adding the Gradle Plugin? 🤔
I think @eskatos don't want to have this inside Gradle because it may be changed in the future. And you (as Kotlin/Jetbrains dev) can simply update your Plugin when it changes.
Means it will always point to the correct url...