I mean I understand the warning, I guess I don't u...
# gradle
x
I mean I understand the warning, I guess I don't understand why there's a duplicate
c
You're referencing it somewhere (maybe transitively). If you post your build file, maybe we can help.
x
same one as I was working on earlier but
that's the current version
hmmm... wait maybe I'm wrong, maybe it's not happening in that build
c
Yeah, I'm not familiar with all the libraries used, but I don't see why would you get the warning.
x
maybe I fixed it in that one
Copy code
import com.github.spotbugs.SpotBugsTask
import com.github.spotbugs.SpotBugsPlugin
import io.spring.gradle.dependencymanagement.DependencyManagementPlugin
import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension
import io.spring.gradle.dependencymanagement.internal.DependencyManagement
import org.gradle.api.credentials.AwsCredentials
import org.gradle.kotlin.dsl.maven
import org.gradle.kotlin.dsl.repositories
import io.spring.gradle.dependencymanagement.internal.DependencyManagementSettings
import io.spring.gradle.dependencymanagement.internal.dsl.StandardDependencyManagementExtension
import org.gradle.internal.impldep.junit.runner.Version.id
import org.gradle.kotlin.dsl.creating
import org.gradle.kotlin.dsl.support.illegalElementType
import org.gradle.model.internal.core.TypeCompatibilityModelProjectionSupport.description
import org.gradle.plugins.ide.idea.model.IdeaModel
import org.gradle.plugins.ide.idea.model.IdeaProject
import java.lang.System

plugins {
    `java`
    `java-library`
    `maven-publish`
    `checkstyle`
    `idea`
    id("com.github.spotbugs").version("1.6.0")
    id("net.ltgt.errorprone").version("0.0.13")
    id("net.ltgt.apt").version("0.13")
    id("net.ltgt.apt-idea").version("0.13")
    id("io.spring.dependency-management").version("1.0.4.RELEASE")
}

repositories {
    maven(System.getenv("JAR_REPOSITORY_URI"))
    jcenter()
}

group = "com.xenoterracide.rpf"
version = "0.1.0-SNAPSHOT"
description = "Infrastructure Services"

dependencyManagement {
    imports {
        mavenBom("com.xenoterracide:bom:0.1.0-SNAPSHOT")
    }
}

// In this section you declare the dependencies for your production and test code
dependencies {
    errorprone("com.google.guava:guava:22.0")
    errorprone("com.google.errorprone:error_prone_core:latest.release")
    implementation("org.springframework.boot:spring-boot-starter")
    compile("org.springframework:spring-context")
    testImplementation("org.springframework.boot:spring-boot-starter-test")
    testImplementation("org.assertj:assertj-core")
}

idea {
    module {
        isDownloadSources = true
        isDownloadJavadoc = true
    }
}

checkstyle {
    toolVersion = "8.4"
    sourceSets = listOf(java.sourceSets["main"])
}

spotbugs {
    toolVersion = "3.1.0"
    effort = "max"
    reportLevel = "low"
    sourceSets = listOf(java.sourceSets["main"])
}

val sourcesJar by tasks.creating(Jar::class) {
    classifier = "sources"
    from(java.sourceSets["main"].allSource)
}

publishing {
    repositories {
        maven {
            url = uri(System.getenv("JRS_S3_URI") ?: "")
            credentials(AwsCredentials::class.java) {
                accessKey = System.getenv("JRS_ACCESSKEYID")
                secretKey = System.getenv("JRS_SECRETACCESSKEY")
            }
        }
    }
    (publications) {
        "mavenJava"(MavenPublication::class) {
            from(components["java"])
            artifact(sourcesJar)
        }
    }
}

tasks.withType<Checkstyle> {
    reports {
        xml.isEnabled = false
        html.isEnabled = false
    }
}

tasks.withType<SpotBugsTask> {
    reports {
        xml.isEnabled = false
    }
}

tasks.withType<JavaCompile> {
    options.compilerArgs.addAll(listOf(
        "-XepExcludedPaths:.*/build/generated/.*",
        "-Xep:MissingOverride:ERROR",
        "-Xep:Var:ERROR"
    ))
}
but definately happening in this one which is largely copypasta
c
nothing here either. Maybe culprit is your dependency management bom
can you run
./gradlew dependencies
?
look for
kotlin-compiler-embeddable
in the output
only places it is valid to appear (if you're not writing a gradle plugin) are:
kapt
and
kaptTest
dependencies
x
Copy code
./gradlew dependencies | grep kotlin
returned a whole lotta nothing, and eyeballing it I don't see it either
c
sounds like magic 😄
what about
./gradlew buildEnv
?
x
ok, it must have been one of the things that needed changing, 'cause now it's gone
not that any of that makes sense
c
well, I do not know what and where needed changing, but I'm glad it works for you 🙂
x
me either
lol