Quarkus: Gradle created project duplicates dependencies section when Kotlin is selected

Created on 6 Nov 2019  路  14Comments  路  Source: quarkusio/quarkus

// 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'
}
good first issue kinbug

Most helpful comment

sure, I can have a look at this one today

All 14 comments

@zulq which one is repeated?

aw ok, I haven't seen, it's totally duplicated 馃槄 @geoand 馃

Is there an issue in Quarkus proper?

@geoand I transferred the issue. I can't reproduce for now

Ok I've just reproduced using the exact same dependencies weird..

Ok it's when we add Kotlin

I can take a look at it soon, but not for a few more days probably

Ok it's when we add Kotlin

That's great to know!

@aguibert would you mind having a look at that one?

sure, I can have a look at this one today

Issue also happens when Scala selected (i.e. any non-default SourceType)

So one stone - two birds :) ?

It's not a bad idea to have tests in code.quarkus.io but it's a bit too late in the process. We need tests in the main tree.

Was this page helpful?
0 / 5 - 0 ratings