File tree Expand file tree Collapse file tree 1 file changed +25
-7
lines changed
Expand file tree Collapse file tree 1 file changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -36,18 +36,36 @@ gradlePlugin {
3636 }
3737}
3838
39- tasks {
40- withType<JavaCompile > {
41- options.encoding = " UTF-8"
42- }
43- }
44-
4539java {
4640 toolchain {
4741 languageVersion.set(JavaLanguageVersion .of(17 ))
4842 }
4943}
50-
44+ tasks {
45+ register<Jar >(" sourcesJar" ) {
46+ archiveClassifier.set(" sources" )
47+ from(sourceSets.main.get().allSource)
48+ }
49+ register<Jar >(" javadocJar" ) {
50+ archiveClassifier.set(" javadoc" )
51+ from(javadoc)
52+ }
53+ javadoc {
54+ options.encoding = " UTF-8"
55+ options.memberLevel = JavadocMemberLevel .PUBLIC
56+ isFailOnError = false
57+ }
58+ withType<JavaCompile > {
59+ options.encoding = Charsets .UTF_8 .name()
60+ options.release.set(17 )
61+ }
62+ build {
63+ dependsOn(" sourcesJar" , " javadocJar" )
64+ }
65+ jar {
66+ enabled = true
67+ }
68+ }
5169publishing {
5270 publications {
5371 create<MavenPublication >(" mavenJava" ) {
You can’t perform that action at this time.
0 commit comments