question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
aguibertcommented, Nov 6, 2019

sure, I can have a look at this one today

1reaction
aguibertcommented, Nov 8, 2019
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found