Skip to content

Commit

Permalink
MKUI finally exports javadoc and source jars!
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Apr 29, 2023
1 parent 28f0e63 commit da1048a
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,10 @@ dependencies {
testImplementation("com.github.Anuken.Mindustry:core:$mindustryVersion")
}

tasks.withType<Jar> {
tasks.jar {
archiveFileName.set("MKUI.jar")
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "com.github.mnemotechnician"
artifactId = "mkui"
version = "v1.2.1"

from(components["java"])
}
}
}

tasks.test {
useJUnitPlatform()
}
Expand All @@ -57,3 +45,27 @@ tasks.withType<KotlinCompile> {
)
}
}

val javadocJar by tasks.creating(Jar::class) {
from(tasks.dokkaJavadoc.get().outputs)
archiveClassifier.set("javadoc")
}

val sourceJar by tasks.creating(Jar::class) {
from(sourceSets["main"].allSource)
archiveClassifier.set("sources")
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "com.github.mnemotechnician"
artifactId = "mkui"
version = "v1.2.2"

from(components["java"])
artifact(javadocJar)
artifact(sourceJar)
}
}
}

0 comments on commit da1048a

Please sign in to comment.