Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 3 additions & 25 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,13 @@ dependencies {
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

val sourcesJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
->
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
->
dependsOn.add(tasks.javadoc)
archiveClassifier.set("javadoc")
from(tasks.javadoc)
}

tasks {
artifacts {
archives(sourcesJar)
archives(javadocJar)
}
}

tasks.withType<JavaCompile>().configureEach {
options.release = 8
}
Expand All @@ -72,6 +54,7 @@ tasks.named<Javadoc>("javadoc") {
publishing {
publications {
create<MavenPublication>("javaClient") {
from(components["java"])
repositories {
// For the time being
mavenLocal()
Expand Down Expand Up @@ -118,11 +101,6 @@ publishing {
}
}
}
artifacts {
artifact(tasks.jar)
artifact(sourcesJar)
artifact(javadocJar)
}
}
}
}
Expand Down