diff options
author | isxander <xander@isxander.dev> | 2024-04-29 23:04:09 +0100 |
---|---|---|
committer | isxander <xander@isxander.dev> | 2024-04-29 23:04:09 +0100 |
commit | a68da6273606ca938a212aabf4c43faea5746641 (patch) | |
tree | 93e4b5d8b9bc1ba7f4cfe7b55e1a94e79a594611 /build.gradle.kts | |
parent | e0b3f5b5a22218d1939a6ea308c85339a050bcaf (diff) | |
download | YetAnotherConfigLib-a68da6273606ca938a212aabf4c43faea5746641.tar.gz YetAnotherConfigLib-a68da6273606ca938a212aabf4c43faea5746641.tar.bz2 YetAnotherConfigLib-a68da6273606ca938a212aabf4c43faea5746641.zip |
1.20.5 neoforge
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 1784b0e..6dfe457 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,15 +2,13 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { `java-library` - kotlin("jvm") version "1.9.22" + kotlin("jvm") version "1.9.23" id("dev.architectury.loom") version "1.6.+" id("me.modmuss50.mod-publish-plugin") version "0.5.+" `maven-publish` id("org.ajoberstar.grgit") version "5.0.+" - - id("io.github.p03w.machete") version "2.+" } val loader = loom.platform.get().name.lowercase() @@ -181,7 +179,6 @@ dependencies { java { withSourcesJar() - //withJavadocJar() } tasks { @@ -210,11 +207,9 @@ tasks { if (isFabric) { filesMatching("fabric.mod.json") { expand(props) } - exclude("META-INF/mods.toml") } if (isForgeLike) { - filesMatching("META-INF/mods.toml") { expand(props) } - exclude("fabric.mod.json") + filesMatching(listOf("META-INF/mods.toml", "META-INF/neoforge.mods.toml")) { expand(props) } } } @@ -226,10 +221,6 @@ tasks { } } -machete { - json.enabled.set(false) -} - java { targetCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_17 @@ -273,10 +264,6 @@ publishMods { requires { slug.set("fabric-api") } } - - tasks.getByName("publishModrinth") { - dependsOn("optimizeOutputsOfRemapJar") - } } val curseforgeId: String by project @@ -288,10 +275,6 @@ publishMods { requires { slug.set("fabric-api") } } - - tasks.getByName("publishCurseforge") { - dependsOn("optimizeOutputsOfRemapJar") - } } val githubProject: String by project @@ -301,10 +284,6 @@ publishMods { accessToken.set(findProperty("github.token")?.toString()) commitish.set(grgit.branch.current().name) } - - tasks.getByName("publishGithub") { - dependsOn("optimizeOutputsOfRemapJar") - } } } @@ -337,22 +316,14 @@ publishing { this.password = password } } - tasks.getByName("publishModPublicationToXanderReleasesRepository") { - dependsOn("optimizeOutputsOfRemapJar") - } } else { println("Xander Maven credentials not satisfied.") } } } -tasks.getByName("generateMetadataFileForModPublication") { - dependsOn("optimizeOutputsOfRemapJar") -} - -fun <T> optionalProp(property: String, block: (String) -> T?) { +fun <T> optionalProp(property: String, block: (String) -> T?): T? = findProperty(property)?.toString()?.takeUnless { it.isBlank() }?.let(block) -} fun isPropDefined(property: String): Boolean { return property(property)?.toString()?.isNotBlank() ?: false |