@@ -20,7 +20,7 @@ repositories {
2020
2121dependencies {
2222
23- @Suppress( " DependencyOnStdlib " ) implementation( kotlin(" stdlib " ))
23+ testImplementation( kotlin(" test " ))
2424
2525 implementation(" com.github.TheFruxz:Ascend:2023.2" )
2626
@@ -33,26 +33,6 @@ dependencies {
3333
3434}
3535
36- java {
37- sourceCompatibility = VERSION_17
38- targetCompatibility = VERSION_17
39- withJavadocJar()
40- withSourcesJar()
41- }
42-
43- tasks {
44-
45- withType<KotlinCompile > {
46- kotlinOptions.jvmTarget = " 17"
47- kotlinOptions.freeCompilerArgs + = " -opt-in=kotlin.RequiresOptIn"
48- }
49-
50- dokkaHtml.configure {
51- outputDirectory.set(buildDir.resolve(" ../docs/" ))
52- }
53-
54- }
55-
5636val dokkaJavadocJar by tasks.register<Jar >(" dokkaJavadocJar" ) {
5737 dependsOn(tasks.dokkaJavadoc)
5838 from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
@@ -65,7 +45,7 @@ val dokkaHtmlJar by tasks.register<Jar>("dokkaHtmlJar") {
6545 archiveClassifier.set(" html-doc" )
6646}
6747
68- val source by tasks.register<Jar >(" sourceJar" ) {
48+ val sourceJar by tasks.register<Jar >(" sourceJar" ) {
6949 from(sourceSets.main.get().allSource)
7050 archiveClassifier.set(" sources" )
7151}
@@ -88,16 +68,38 @@ publishing {
8868 }
8969
9070 publications.create(" Stacked" , MavenPublication ::class ) {
91-
92- from(components[ " kotlin " ] )
71+ artifactId = " stacked "
72+ version = version.lowercase( )
9373
9474 artifact(dokkaJavadocJar)
9575 artifact(dokkaHtmlJar)
96- artifact(source)
76+ artifact(sourceJar) {
77+ classifier = " sources"
78+ }
9779
98- artifactId = " stacked"
99- version = version.toLowerCase()
80+ from(components[" kotlin" ])
81+
82+ }
83+
84+ }
85+
86+ tasks {
87+
88+ withType<KotlinCompile > {
89+ kotlinOptions.freeCompilerArgs + = " -opt-in=kotlin.RequiresOptIn"
90+ }
10091
92+ dokkaHtml.configure {
93+ outputDirectory.set(buildDir.resolve(" ../docs/" ))
10194 }
10295
10396}
97+
98+ kotlin {
99+ jvmToolchain(17 )
100+ }
101+
102+ java {
103+ sourceCompatibility = VERSION_17
104+ targetCompatibility = VERSION_17
105+ }
0 commit comments