File tree Expand file tree Collapse file tree 1 file changed +3
-25
lines changed
Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -29,31 +29,13 @@ dependencies {
2929java {
3030 sourceCompatibility = JavaVersion .VERSION_1_8
3131 targetCompatibility = JavaVersion .VERSION_1_8
32+ withSourcesJar()
33+ withJavadocJar()
3234 toolchain {
3335 languageVersion = JavaLanguageVersion .of(17 )
3436 }
3537}
3638
37- val sourcesJar: TaskProvider <Jar > by tasks.registering(Jar ::class ) {
38- ->
39- archiveClassifier.set(" sources" )
40- from(sourceSets.main.get().allSource)
41- }
42-
43- val javadocJar: TaskProvider <Jar > by tasks.registering(Jar ::class ) {
44- ->
45- dependsOn.add(tasks.javadoc)
46- archiveClassifier.set(" javadoc" )
47- from(tasks.javadoc)
48- }
49-
50- tasks {
51- artifacts {
52- archives(sourcesJar)
53- archives(javadocJar)
54- }
55- }
56-
5739tasks.withType<JavaCompile >().configureEach {
5840 options.release = 8
5941}
@@ -72,6 +54,7 @@ tasks.named<Javadoc>("javadoc") {
7254publishing {
7355 publications {
7456 create<MavenPublication >(" javaClient" ) {
57+ from(components[" java" ])
7558 repositories {
7659 // For the time being
7760 mavenLocal()
@@ -118,11 +101,6 @@ publishing {
118101 }
119102 }
120103 }
121- artifacts {
122- artifact(tasks.jar)
123- artifact(sourcesJar)
124- artifact(javadocJar)
125- }
126104 }
127105 }
128106}
You can’t perform that action at this time.
0 commit comments