diff --git a/build.gradle b/build.gradle index eeb6579d..d19bedad 100644 --- a/build.gradle +++ b/build.gradle @@ -32,18 +32,17 @@ dependencies { annotationProcessor 'org.jetbrains:annotations:23.0.0' } -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - compileJava { options.encoding = 'UTF-8' } -javadoc { - failOnError false - options.addStringOption('Xdoclint:none', '-quiet') - options.addStringOption('encoding', 'UTF-8') - options.addStringOption('charSet', 'UTF-8') +java { + def javaVersion = JavaVersion.VERSION_1_8 + sourceCompatibility = javaVersion + targetCompatibility = javaVersion + if (JavaVersion.current() < javaVersion) { + toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) + } } publishing { @@ -64,15 +63,6 @@ processResources { } } -jar { - dependsOn configurations.runtimeClasspath - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - archivesBaseName = rootProject.name - from { - configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) } - } -} - shadowJar { relocate "org.bstats", "eu.decentsoftware.holograms.metrics" } \ No newline at end of file