aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-08-31 11:59:47 +0200
committerLinnea Gräf <nea@nea.moe>2024-08-31 11:59:47 +0200
commit816f80f862d2f5de6bc9b0ae84cd6df0da341228 (patch)
treeee8aaccbaebe5a024549c2530319ed09a02cc4e4 /build.gradle.kts
parentd2f240ff0ca0d27f417f837e706c781a98c31311 (diff)
downloadFirmament-816f80f862d2f5de6bc9b0ae84cd6df0da341228.tar.gz
Firmament-816f80f862d2f5de6bc9b0ae84cd6df0da341228.tar.bz2
Firmament-816f80f862d2f5de6bc9b0ae84cd6df0da341228.zip
Add configured compat
[no changelog]
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts11
1 files changed, 9 insertions, 2 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index fe527ba..90eb334 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,6 +8,7 @@
import moe.nea.licenseextractificator.LicenseDiscoveryTask
import net.fabricmc.loom.LoomGradleExtension
+import org.gradle.internal.extensions.stdlib.capitalized
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -96,7 +97,7 @@ val compatSourceSets: MutableSet<SourceSet> = mutableSetOf()
fun createIsolatedSourceSet(name: String, path: String = "compat/$name"): SourceSet {
val ss = sourceSets.create(name) {
this.java.setSrcDirs(listOf(layout.projectDirectory.dir("src/$path/java")))
- this.kotlin.setSrcDirs(listOf(layout.projectDirectory.dir("src/$path/kotlin")))
+ this.kotlin.setSrcDirs(listOf(layout.projectDirectory.dir("src/$path/java")))
}
compatSourceSets.add(ss)
loom.createRemapConfigurations(ss)
@@ -111,12 +112,15 @@ fun createIsolatedSourceSet(name: String, path: String = "compat/$name"): Source
(mainSS.runtimeOnlyConfigurationName) {
extendsFrom(getByName(ss.runtimeClasspathConfigurationName))
}
+ ("ksp" + ss.name.replaceFirstChar { it.uppercaseChar() }) {
+ extendsFrom(ksp.get())
+ }
}
dependencies {
runtimeOnly(ss.output)
(ss.implementationConfigurationName)(sourceSets.main.get().output)
}
- tasks.jar {
+ tasks.shadowJar {
from(ss.output)
}
return ss
@@ -171,6 +175,8 @@ dependencies {
include(libs.hypixelmodapi.fabric)
compileOnly(project(":javaplugin"))
annotationProcessor(project(":javaplugin"))
+ implementation("com.google.auto.service:auto-service-annotations:1.1.1")
+ ksp("dev.zacsweers.autoservice:auto-service-ksp:1.2.0")
include(libs.manninghamMills)
include(libs.moulconfig)
@@ -285,6 +291,7 @@ tasks.shadowJar {
archiveClassifier.set("dev")
relocate("io.github.moulberry.repo", "moe.nea.firmament.deps.repo")
destinationDirectory.set(layout.buildDirectory.dir("badjars"))
+ mergeServiceFiles()
}
tasks.remapJar {