aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts29
1 files changed, 29 insertions, 0 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index f3be98715..e932aaa36 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -10,6 +10,7 @@ plugins {
id("com.github.johnrengelman.shadow") version "7.1.2"
kotlin("jvm") version "1.9.0"
id("com.bnorm.power.kotlin-power-assert") version "0.13.0"
+ `maven-publish`
id("moe.nea.shot") version "1.0.0"
}
@@ -257,3 +258,31 @@ val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}
+val sourcesJar by tasks.creating(Jar::class) {
+ destinationDirectory.set(layout.buildDirectory.dir("badjars"))
+ archiveClassifier.set("src")
+ from(sourceSets.main.get().allSource)
+}
+
+publishing.publications {
+ create<MavenPublication>("maven") {
+ artifact(tasks.remapJar)
+ artifact(sourcesJar) { classifier = "sources" }
+ pom {
+ name.set("SkyHanni")
+ licenses {
+ license {
+ name.set("GNU Lesser General Public License")
+ url.set("https://github.com/hannibal002/SkyHanni/blob/HEAD/LICENSE")
+ }
+ }
+ developers {
+ developer { name.set("hannibal002") }
+ developer { name.set("The SkyHanni contributors") }
+ }
+ }
+ }
+}
+
+
+