diff --git a/build.gradle.kts b/build.gradle.kts index 70901a17f..e0d2033e7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - java + base kotlin("jvm") version "1.5.10" apply false id("architectury-plugin") version "3.2-SNAPSHOT" @@ -20,11 +20,25 @@ group = "io.github.juuxel" version = "${project.property("mod-version")}+${project.property("minecraft-version")}" base.archivesBaseName = "Adorn" +tasks { + val collectJars by registering(Copy::class) { + val tasks = subprojects.map { it.tasks.named("remapJar") } + dependsOn(tasks) + + from(tasks) + into(buildDir.resolve("libs")) + } + + assemble { + dependsOn(collectJars) + } +} + subprojects { apply(plugin = "java") apply(plugin = "org.jetbrains.kotlin.jvm") - java { + extensions.configure { sourceCompatibility = JavaVersion.VERSION_16 targetCompatibility = JavaVersion.VERSION_16 } @@ -43,8 +57,9 @@ subprojects { kotlinOptions.jvmTarget = "15" } - jar { + "jar"(Jar::class) { from(rootProject.file("LICENSE")) + archiveClassifier.set("dev-slim") } } } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 937d959d2..9a71627aa 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -28,6 +28,12 @@ kotlinter { disabledRules = arrayOf("parameter-list-wrapping") } +tasks { + remapJar { + archiveClassifier.set("common") + } +} + // PLEASE REMOVE AFTEREVALUATE FROM LOOM afterEvaluate { tasks {