From a2c0db53800c353b3b8154964645e7d6499d17ab Mon Sep 17 00:00:00 2001 From: ThatGravyBoat Date: Mon, 27 Sep 2021 18:24:10 -0230 Subject: Updated build.gradle to make built jars need the minimal amount of shadowed libs. Added Config and a config command. - Made it so that you can disable the confirmation popup. Fixed some classes have the wrong names. Added a backup plan to disable the mod via the ExternalConfiguration. --- build.gradle | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index c5d186a..48fe77b 100644 --- a/build.gradle +++ b/build.gradle @@ -20,8 +20,8 @@ minecraft { } configurations { - include - implementation.extendsFrom(include) + provided + compile.extendsFrom(provided) } repositories { @@ -33,8 +33,8 @@ repositories { } dependencies { - include 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21' - include "gg.essential:loader-launchwrapper:1.1.1" + //include 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21' + provided "gg.essential:loader-launchwrapper:1.1.1" implementation "gg.essential:essential-1.8.9-forge:1457" } @@ -42,21 +42,10 @@ dependencies { * This task simply replaces the `${version}` and `${mcversion}` properties in the mcmod.info with the data from Gradle */ processResources { - // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version - - // replace stuff in mcmod.info, nothing else - from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info' - - // replace version and mcversion - expand 'version': project.version, 'mcversion': project.minecraft.version - } - - // copy everything else, thats not the mcmod.info - from(sourceSets.main.resources.srcDirs) { - exclude 'mcmod.info' + filesMatching("mcmod.info") { + expand "version": project.version, "mcversion": project.minecraft.version } } @@ -77,7 +66,7 @@ tasks.reobfJar.dependsOn(tasks.shadowJar) shadowJar { archiveClassifier.set('') - configurations = [project.configurations.include] + configurations = [project.configurations.provided] duplicatesStrategy DuplicatesStrategy.EXCLUDE } -- cgit