Kotlin DSL does not refer to bom version properly
See original GitHub issueimport org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "2.1.5.RELEASE"
id("io.spring.dependency-management") version "0.6.0.RELEASE"
kotlin("jvm") version "1.2.71"
kotlin("plugin.spring") version "1.2.71"
}
group = "com.dont39"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
extra["springCloudVersion"] = "Greenwich.SR1"
dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.springframework.cloud:spring-cloud-config-server")
implementation("org.springframework.cloud:spring-cloud-starter-config")
implementation("org.springframework.cloud:spring-cloud-starter-consul-discovery")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}")
// Should use extra["springCloudVersion"]
}
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
In dependencyManagement, should use ${extra[“springCloudVersion”]} instead of ${springCloudVersion}.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Version control plugins. BOM for plugins? - Stack Overflow
When i click on class PluginVersion in module1 i see only bite code, and IDEA don't wont decompile it, and i can't see...
Read more >Kotlin-bom in multiplatform projects?
This fails with an “Unresolved reference: implementation” error. From what I gather, this is because the Kotlin plugin isn't actually applied ...
Read more >Using Kotlin - Quarkus
Using a different Kotlin version in a Quarkus application is typically not recommended. But in order to do so, you must import the...
Read more >Building Kotlin Libraries Sample - Gradle User Manual
When prompted, select the 3: library project type and 4: Kotlin as implementation language. Next you can choose the DSL for writing buildscripts...
Read more >Using the SDK with Gradle - AWS SDK for Java 1.x
Gradle automatically resolves the correct version of your SDK dependencies by using the information from the BOM. The following is an example of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, but we’re already aware of that. That’s why this issue exists and is still open. As @snicoll has already indicated, a fix will be provided ASAP.
@Dontcampy thank you very much for reporting the problem with a sample, that was very helpful.