summaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-09-24 16:41:49 +0200
committerLinnea Gräf <nea@nea.moe>2024-09-24 16:41:49 +0200
commitaa1238430bd0f103f040ed31baadc029bb09529e (patch)
tree05aa9d4f6a1c35166003dc8e306dd2c40a818945 /build.gradle.kts
parentfb40ab45f0b4979420bae066da2244f4fdd52db8 (diff)
downloadultra-notifier-aa1238430bd0f103f040ed31baadc029bb09529e.tar.gz
ultra-notifier-aa1238430bd0f103f040ed31baadc029bb09529e.tar.bz2
ultra-notifier-aa1238430bd0f103f040ed31baadc029bb09529e.zip
snapshot
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts24
1 files changed, 15 insertions, 9 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index e95fde4..aedae03 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -34,6 +34,7 @@ java.toolchain.languageVersion.set(mcJavaVersion)
preprocess.run {
vars.put("MC", version.minecraftVersion.versionNumber)
vars.put("FORGE", if ((version.forgeDep != null)) 1 else 0)
+ vars.put("FABRIC", if ((version.forgeDep != null)) 0 else 1)
vars.put("JAVA", mcJavaVersion.asInt())
}
loom.run {
@@ -60,11 +61,14 @@ val shadowImpl by configurations.creating {
val shadowModImpl by configurations.creating {
modImplementation.extendsFrom(this)
}
-val include = if (version.forgeDep != null) configurations.getByName("include") else shadowModImpl
+val include = if (version.forgeDep != null) configurations.create("includeModImpl") {
+ configurations.getByName("include").extendsFrom(this)
+ modImplementation.extendsFrom(this)
+} else shadowModImpl
val devauthVersion = "1.1.2"
dependencies {
"minecraft"("com.mojang:minecraft:" + version.minecraftVersion.versionName)
- "mappings"(if(version.mappingDependency=="official") loom.officialMojangMappings() else version.mappingDependency)
+ "mappings"(if (version.mappingDependency == "official") loom.officialMojangMappings() else version.mappingDependency)
if (version.forgeDep != null) {
"forge"(version.forgeDep!!)
runtimeOnly("me.djtheredstoner:DevAuth-forge-legacy:$devauthVersion")
@@ -118,7 +122,7 @@ tasks.shadowJar {
tasks.processResources {
inputs.property("java", mcJavaVersion.asInt().toString())
- inputs.property("mcVersion", version.minecraftVersion)
+ inputs.property("mcVersion", version.minecraftVersion.versionName)
inputs.property("version", project.version.toString())
inputs.property("modName", "Ultra Notifier")
inputs.property("description", "Ultra Notifications")
@@ -150,9 +154,11 @@ tasks.named("runClient", RunGameTask::class) {
})
}
-tasks.withType<JavaCompile> {
- onlyIf { false }
-}
-tasks.withType<KotlinCompile> {
- onlyIf { false }
-}
+if (version == Versions.MC116Forge) {
+ tasks.withType<JavaCompile> {
+ onlyIf { false }
+ }
+ tasks.withType<KotlinCompile> {
+ onlyIf { false }
+ }
+} \ No newline at end of file