diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-06-22 00:13:50 +0700 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-06-22 00:13:50 +0700 |
commit | ec663490bd1e2c9933844761348c20f7b1d84613 (patch) | |
tree | 5777df069be3a0517aa855340bf4d53f020f4d6f | |
parent | aefb6af5e423984609c147cd9aa3d46edf80811a (diff) | |
download | OneConfig-ec663490bd1e2c9933844761348c20f7b1d84613.tar.gz OneConfig-ec663490bd1e2c9933844761348c20f7b1d84613.tar.bz2 OneConfig-ec663490bd1e2c9933844761348c20f7b1d84613.zip |
fix literally everything
-rw-r--r-- | build.gradle.kts | 21 | ||||
-rw-r--r-- | gradle.properties | 2 |
2 files changed, 19 insertions, 4 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 384fa29..1f20571 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import gg.essential.gradle.util.RelocationTransform.Companion.registerRelocationAttribute import gg.essential.gradle.util.noServerRunConfigs import gg.essential.gradle.util.prebundle +import net.fabricmc.loom.task.RemapSourcesJarTask plugins { @@ -67,6 +68,10 @@ val relocated = registerRelocationAttribute("relocate") { relocate("gg.essential", "cc.polyfrost.oneconfig.libs") relocate("me.kbrewster", "cc.polyfrost.oneconfig.libs") relocate("com.github.benmanes", "cc.polyfrost.oneconfig.libs") + relocate("com.google", "cc.polyfrost.oneconfig.libs") + relocate("org.checkerframework", "cc.polyfrost.oneconfig.libs") + remapStringsIn("com.github.benmanes.caffeine.cache.LocalCacheFactory") + remapStringsIn("com.github.benmanes.caffeine.cache.NodeFactory") } val shadeRelocated: Configuration by configurations.creating { @@ -98,6 +103,9 @@ dependencies { isTransitive = false } + @Suppress("GradlePackageUpdate") + shadeRelocated("com.github.ben-manes.caffeine:caffeine:2.9.3") + // for other mods and universalcraft val kotlinVersion: String by project val coroutinesVersion: String by project @@ -120,7 +128,7 @@ dependencies { isTransitive = false } shade("cc.polyfrost:lwjgl:1.0.0-alpha1") - shade(prebundle(shadeRelocated)) // TODO: fix shadeNoPOM here + shadeNoPom(prebundle(shadeRelocated)) dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.21") @@ -189,7 +197,7 @@ tasks { } named<ShadowJar>("shadowJar") { archiveClassifier.set("donotusethis") - configurations = listOf(shade) + configurations = listOf(shade, shadeNoPom) duplicatesStrategy = DuplicatesStrategy.EXCLUDE dependsOn(jar) } @@ -202,7 +210,7 @@ tasks { } jar { dependsOn(shadeNoPom) - from({ shadeNoPom.map { zipTree(it) } }) + from({ shadeNoPom.map { if (it.isDirectory) it else zipTree(it) } }) manifest { attributes( mapOf( @@ -245,6 +253,13 @@ tasks { named<Jar>("sourcesJar") { dependsOn(dokkaJar) excludeInternal() + archiveClassifier.set("sources") + doFirst { + archiveClassifier.set("sources") + } + } + withType<RemapSourcesJarTask> { + enabled = false } } diff --git a/gradle.properties b/gradle.properties index e7f0912..53fd018 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_name = OneConfig mod_id = oneconfig -mod_version = 0.1.0-alpha25 +mod_version = 0.1.0-alpha26 essential.defaults.loom=0 |