aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <romangraef@gmail.com>2022-09-22 22:30:50 +0200
committerGitHub <noreply@github.com>2022-09-22 22:30:50 +0200
commitc3846a58401304f60c549bf27ec2b47eb50b5477 (patch)
tree66aed446a6c419a6f391a5a7571017ca6f772f01 /build.gradle.kts
parent157b1107f818e1b8a9c89ca15cb627cad537371d (diff)
downloadSkyHanni-c3846a58401304f60c549bf27ec2b47eb50b5477.tar.gz
SkyHanni-c3846a58401304f60c549bf27ec2b47eb50b5477.tar.bz2
SkyHanni-c3846a58401304f60c549bf27ec2b47eb50b5477.zip
Merge pull request #4
* Import NEU in dev env
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts61
1 files changed, 39 insertions, 22 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index c2602e260..1e6e63aa1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -17,30 +17,9 @@ java {
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
}
-// Minecraft configuration:
-loom {
- launchConfigs {
- "client" {
- // If you don't want mixins, remove these lines
- property("mixin.debug", "true")
- property("asmhelper.verbose", "true")
- arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
- arg("--mixin", "mixins.skyhanni.json")
- }
- }
- forge {
- pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter())
- // If you don't want mixins, remove this lines
- mixinConfig("mixins.skyhanni.json")
- }
- // If you don't want mixins, remove these lines
- mixin {
- defaultRefmapName.set("mixins.skyhanni.refmap.json")
- }
-}
sourceSets.main {
- output.setResourcesDir(file("$buildDir/classes/kotlin/main"))
+ output.setResourcesDir(file("$buildDir/classes/java/main"))
}
// Dependencies:
@@ -50,12 +29,22 @@ repositories {
maven("https://repo.spongepowered.org/maven/")
// If you don't want to log in with your real minecraft account, remove this line
maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1")
+ maven("https://jitpack.io") {
+ content {
+ includeGroupByRegex("com\\.github\\..*")
+ }
+ }
}
val shadowImpl by configurations.creating {
configurations.implementation.get().extendsFrom(this)
}
+val devenvMod by configurations.creating {
+ isTransitive = false
+ isVisible = false
+}
+
dependencies {
minecraft("com.mojang:minecraft:1.8.9")
mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9")
@@ -71,6 +60,33 @@ dependencies {
modRuntimeOnly("me.djtheredstoner:DevAuth-forge-legacy:1.1.0")
implementation(kotlin("stdlib-jdk8"))
+ devenvMod("com.github.romangraef:notenoughupdates:b3e3583:all")
+
+}
+
+// Minecraft configuration:
+loom {
+ launchConfigs {
+ "client" {
+ // If you don't want mixins, remove these lines
+ property("mixin.debug", "true")
+ property("asmhelper.verbose", "true")
+ arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
+ arg("--mixin", "mixins.skyhanni.json")
+ val modFiles = devenvMod
+ .incoming.artifacts.resolvedArtifacts.get()
+ arg("--mods", modFiles.joinToString(",") { it.file.relativeTo(file("run")).path })
+ }
+ }
+ forge {
+ pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter())
+ // If you don't want mixins, remove this lines
+ mixinConfig("mixins.skyhanni.json")
+ }
+ // If you don't want mixins, remove these lines
+ mixin {
+ defaultRefmapName.set("mixins.skyhanni.refmap.json")
+ }
}
// Tasks:
@@ -81,6 +97,7 @@ tasks.withType(JavaCompile::class) {
tasks.withType(Jar::class) {
archiveBaseName.set("SkyHanni")
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest.attributes.run {
this["FMLCorePluginContainsFMLMod"] = "true"
this["ForceLoadAsMod"] = "true"