Tobi
09/14/2018, 2:55 PMbuild.gradle.kts with Kotlin 1.2.61 and Gradle wrapper 4.10.1:
buildscript {
repositories {
maven("<https://dl.bintray.com/kotlin/kotlin-dev>")
}
}
repositories {
maven("<https://dl.bintray.com/kotlin/kotlin-dev>")
}
plugins {
id("org.gradle.kotlin.kotlin-dsl") version "0.18.3"
}
When I try to increase the version of kotlin-dsl to f.e. 0.18.4 or the latest 0.19.5 I get the following error:
Plugin [id: 'org.gradle.kotlin.kotlin-dsl', version: '0.18.4'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:0.18.4')
Searched in the following repositories:
Gradle Central Plugin Repository
What maven repository is missing here?
Or, which combination of Kotlin and kotlin-dsl should work?eskatos
09/14/2018, 2:59 PMplugins {
`kotlin-dsl`
}
which is equivalent.eskatos
09/14/2018, 2:59 PMeskatos
09/14/2018, 3:00 PMbuildSrc or if you plan to publish a plugin.
See https://docs.gradle.org/current/userguide/kotlin_dsl.htmlTobi
09/14/2018, 3:14 PMbuildSrc to maintain the dependencies of my multi-module project.
Nevertheless, I would like to have control of the kotlin-dsl version. I cannot let Gradle pull in a -RC or -alpha or -beta in an production environment.eskatos
09/14/2018, 3:16 PMkotlin-dsl plugin to use.Nikky
09/14/2018, 3:54 PMallprojects {
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlin") {
useVersion(kotlin_version)
because("version mix-matching annoys me")
}
}
}
}Tobi
09/14/2018, 9:22 PMid("org.gradle.kotlin.kotlin-dsl") version "0.18.0"
or
id("org.gradle.kotlin.kotlin-dsl") version "0.18.3"
although it is tight to the Gradle wrapper defined in the project (if I understand you correctly).Tobi
09/18/2018, 5:53 PMeskatos
09/18/2018, 5:55 PMTobi
01/11/2019, 9:20 AMproject-setup branch: https://github.com/EventFahrplan/EventFahrplan/commit/9cb4c11f0ab8a0737a64b7bc8a78bad3b83004ad
If you have some spare time I would appreciate.eskatos
01/11/2019, 9:23 AMTobi
01/11/2019, 9:32 AMeskatos
01/11/2019, 9:35 AMkotlin-dsl plugin and use the one provided by the current Gradle version
you should use the kotlin-dsl plugin in your build logic projects only (e.g. buildSrc), then in your production code projects you use the regular Kotlin JVM gradle plugin
if you do just that and have an issue, please raise it with a reproducereskatos
01/11/2019, 9:38 AMTobi
01/11/2019, 10:00 AM4.10.2 to 4.10.3 which works. ✔️
As soon as I change id("org.gradle.kotlin.kotlin-dsl") version "0.18.2" to kotlin-dsl I get the following error: ❎
* What went wrong:
Execution failed for task ':buildSrc:compileKotlin'.
> Could not resolve all files for configuration ':buildSrc:kotlinCompilerPluginClasspath'.
> Could not find org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.2.61.
Searched in the following locations: file:~/.gradle/caches/4.10.3/embedded-kotlin-repo-1.2.61-2/repo/org/jetbrains/kotlin/kotlin-scripting-compiler-embeddable/1.2.61/kotlin-scripting-compiler-embeddable-1.2.61.jar
Required by:
project :buildSrc
> Could not find org.jetbrains.kotlin:kotlin-sam-with-receiver:1.2.61.
Required by:
project :buildSrc
I then tried to also use Kotlin 1.3.11 instead of 1.2.51. The error remains the same. ❎
I can push these steps as separate commits if this helps.eskatos
01/11/2019, 10:04 AMTobi
01/11/2019, 10:07 AMmavenCentral() and resynced the project:
> Configure project :buildSrc
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.2.61` that might work differently than in the requested version `1.3.11`.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':buildSrc'.
> Failed to notify project evaluation listener.
> java.lang.AbstractMethodError (no error message)
> java.lang.AbstractMethodError (no error message)
I can paste the --stacktrace log if you want it.eskatos
01/11/2019, 10:10 AMTobi
01/11/2019, 10:12 AMNikky
01/11/2019, 10:15 AMNikky
01/11/2019, 10:19 AMNikky
01/11/2019, 10:20 AMTobi
01/11/2019, 10:26 AM--stacktrace option to have a verbose output.
With regards to Gradle 5. Last time I checked the Android plugin for Gradle was not ready for Gradle 5.eskatos
01/11/2019, 11:21 AMeskatos
01/11/2019, 4:03 PMinclude(":buildSrc"), you’re not supposed to do that, buildSrc is a nested build, not a project.
this is probably what messes thingsTobi
01/11/2019, 11:01 PMTobi
01/12/2019, 12:13 PMmaster. - Thank you once again for your help.