diff options
-rw-r--r-- | gradle.properties | 3 | ||||
-rw-r--r-- | mod/build.gradle | 91 |
2 files changed, 55 insertions, 39 deletions
diff --git a/gradle.properties b/gradle.properties index ab7e8705..49d72768 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ org.gradle.jvmargs=-Xmx2G org.gradle.caching=true -loom.platform=forge
\ No newline at end of file +loom.platform=forge +dg.testwithneu=true
\ No newline at end of file diff --git a/mod/build.gradle b/mod/build.gradle index ce44fbd3..541f722b 100644 --- a/mod/build.gradle +++ b/mod/build.gradle @@ -14,38 +14,6 @@ java { toolchain.languageVersion.set(JavaLanguageVersion.of(8)) } -loom { - launchConfigs { - client { - // probably will have to my own mixin tweaker, due to dungeonsguide's weird dynamic loading stuff -// property("mixin.debug", "true") -// property("asmhelper.verbose", "true") -// arg("--mixin", "mixins.examplemod.json") - - } - } - runConfigs { - named("client") { - ideConfigGenerated(true) - vmArgs.remove("-XstartOnFirstThread") - } - } - runs { - client { - runDir = '../runtime' - property('devauth.enabled','true') - property("fml.coreMods.load", "kr.syeyoung.dungeonsguide.launcher.coremod.DGTweaker") - property('dg.loader', 'devenv') - client() - vmArgs.remove("-XstartOnFirstThread") - } - } - forge { - pack200Provider.set(new dev.architectury.pack200.java.Pack200Adapter()) - } -} - - sourceSets.main { output.setResourcesDir(file("$buildDir/classes/java/main")) } @@ -53,23 +21,33 @@ sourceSets.main { repositories { mavenCentral() - maven { url "https://jitpack.io" } - maven {url "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1"} + maven { + url "https://jitpack.io/" + content { + includeGroupByRegex("(com|io)\\.github\\..+") + } + } + maven { url "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" } } configurations { implementation.extendsFrom shadowImpl - modRuntimeOnly.extendsFrom devEnv { - transitive = false - visible = false - } } +def devenvMod = configurations.create("devenvMod") { + setTransitive(false) + setVisible(false) +} + +def testWithNeu = project.findProperty("dg.testwithneu") == "true" +printf("TestWithNeu: %s", testWithNeu) + dependencies { minecraft("com.mojang:minecraft:1.8.9") mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9") forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9") + implementation "org.jetbrains:annotations-java5:19.0.0" implementation "org.java-websocket:Java-WebSocket:1.5.1" implementation "org.json:json:20171018" @@ -85,8 +63,45 @@ dependencies { compileOnly project(path: ":loader") runtimeOnly project(path: ":loader") + + if (testWithNeu) { + runtimeOnly 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.22' + add("devenvMod", 'com.github.notenoughupdates:notenoughupdates:e603cf2:all') + } } +loom { + launchConfigs { + client { + // probably will have to my own mixin tweaker, due to dungeonsguide's weird dynamic loading stuff +// property("mixin.debug", "true") +// property("asmhelper.verbose", "true") +// arg("--mixin", "mixins.examplemod.json") + arg("--mods", devenvMod.files.collect { file("../runtime").relativePath(it) }.join(",")) + } + } + runConfigs { + named("client") { + ideConfigGenerated(true) + vmArgs.remove("-XstartOnFirstThread") + } + } + runs { + client { + runDir = '../runtime' + property('devauth.enabled', 'true') + property("fml.coreMods.load", "kr.syeyoung.dungeonsguide.launcher.coremod.DGTweaker") + property('dg.loader', 'devenv') + client() + vmArgs.remove("-XstartOnFirstThread") + } + } + forge { + pack200Provider.set(new dev.architectury.pack200.java.Pack200Adapter()) + } +} + + tasks.withType(JavaCompile) { options.encoding = "UTF-8" } |