Skip to content

Commit 10d95b7

Browse files
Update compilation options
Drop unnecessary cleanLibs task, fix link to LICENSE file, set encoding to UTF-8.
1 parent 41e442d commit 10d95b7

2 files changed

Lines changed: 6 additions & 18 deletions

File tree

buildSrc/src/main/kotlin/internal.common-convention.gradle.kts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@ repositories {
88
mavenCentral()
99
}
1010

11-
// Utility to clean up old jars as they can clutter.
12-
// Usage:
13-
// ./gradlew cleanLibs
14-
tasks.register<Delete>("cleanLibs") {
15-
description = "Deletes build/libs directory."
16-
group = "build"
17-
18-
delete(layout.buildDirectory.dir("libs"))
19-
}
20-
2111
// Usage:
2212
// ./gradlew printVersion
2313
tasks.register<DefaultTask>("printVersion") {

buildSrc/src/main/kotlin/internal.java-library-convention.gradle.kts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,17 @@ java {
1616

1717
tasks.withType<JavaCompile>().configureEach {
1818
options.compilerArgs.add("-parameters")
19+
options.encoding = "UTF-8"
1920
}
2021

2122
tasks.withType<Jar>().configureEach {
22-
dependsOn("cleanLibs")
2323
manifest {
24-
manifest {
25-
attributes["Implementation-Title"] = project.name
26-
attributes["Implementation-Version"] = project.version
27-
attributes["Build-Jdk-Spec"] = java.toolchain.languageVersion.get().toString()
28-
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
29-
}
24+
attributes["Implementation-Title"] = project.name
25+
attributes["Implementation-Version"] = project.version
26+
attributes["Build-Jdk-Spec"] = java.toolchain.languageVersion.get().toString()
27+
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
3028
}
31-
from("../LICENSE") {
29+
from("${rootProject.rootDir}/LICENSE") {
3230
into("META-INF/")
3331
rename { "LICENSE.txt" }
3432
}

0 commit comments

Comments
 (0)