Gradle created project duplicates dependencies section when Kotlin is selected
See original GitHub issue// this block is necessary to make enforcedPlatform work for Quarkus plugin available
// only locally (snapshot) that is also importing the Quarkus BOM
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath "io.quarkus:quarkus-gradle-plugin:${quarkusVersion}"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version "1.3.50"
}
apply plugin: 'io.quarkus'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation 'io.quarkus:quarkus-resteasy-jackson'
implementation 'io.quarkus:quarkus-jackson'
implementation 'io.quarkus:quarkus-kotlin'
implementation 'io.quarkus:quarkus-vertx-web'
implementation 'io.quarkus:quarkus-hibernate-validator'
implementation 'io.quarkus:quarkus-smallrye-metrics'
implementation 'io.quarkus:quarkus-spring-data-jpa'
implementation 'io.quarkus:quarkus-smallrye-health'
implementation 'io.quarkus:quarkus-smallrye-jwt'
implementation 'io.quarkus:quarkus-jdbc-mariadb'
implementation 'io.quarkus:quarkus-elytron-security'
implementation 'io.quarkus:quarkus-hibernate-orm'
implementation enforcedPlatform("io.quarkus:quarkus-bom:${quarkusVersion}")
implementation 'io.quarkus:quarkus-resteasy'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.rest-assured:rest-assured'
nativeTestImplementation 'io.quarkus:quarkus-junit5'
nativeTestImplementation 'io.rest-assured:rest-assured'
}
group 'org.demo'
version '1.0.0-SNAPSHOT'
quarkus {
setOutputDirectory("$projectDir/build/classes/kotlin/main")
}
quarkusDev {
setSourceDir("$projectDir/src/main/kotlin")
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation 'io.quarkus:quarkus-resteasy-jackson'
implementation 'io.quarkus:quarkus-jackson'
implementation 'io.quarkus:quarkus-kotlin'
implementation 'io.quarkus:quarkus-vertx-web'
implementation 'io.quarkus:quarkus-hibernate-validator'
implementation 'io.quarkus:quarkus-smallrye-metrics'
implementation 'io.quarkus:quarkus-spring-data-jpa'
implementation 'io.quarkus:quarkus-smallrye-health'
implementation 'io.quarkus:quarkus-smallrye-jwt'
implementation 'io.quarkus:quarkus-jdbc-mariadb'
implementation 'io.quarkus:quarkus-elytron-security'
implementation 'io.quarkus:quarkus-hibernate-orm'
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation 'io.quarkus:quarkus-resteasy'
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.rest-assured:rest-assured'
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Android Studio: Resolving Duplicate Classes - gradle
Check it and remove any duplicate jar files. And the second option could be you have also added the dependency in gradle.
Read more >Gradle 7 requires duplicatesStrategy for "fake" duplicates
Gradle throws the duplicatesStrategy error, when the same source directory is added multiple times. Context. We are using complex builds with a ...
Read more >Kotlin gradle.build ZipException because of duplicates - Android
I add Kotlin to the gradle.build with dependency (Kotlin version 1.0.4): compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version".
Read more >Add build dependencies - Android Developers
Gradle declares dependencies on JAR files inside your project's module_name /libs/ directory (because Gradle reads paths relative to the build.gradle file).
Read more >Gradle dependencies | IntelliJ IDEA Documentation - JetBrains
gradle , right-click the dependency in the Usages part and select Go to 'build. gradle'. If the duplicate dependency is found, it will...
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 Free
Top 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
sure, I can have a look at this one today
indeed! PRs are ready for review now: code fix: https://github.com/quarkusio/quarkus/pull/5311 tests added: https://github.com/quarkusio/code.quarkus.io/pull/226