diff --git a/Common/build.gradle b/Common/build.gradle index a30d498ab..203a0bb89 100644 --- a/Common/build.gradle +++ b/Common/build.gradle @@ -1,18 +1,15 @@ -import com.matyrobbrt.gradle.pngoptimiser.task.OptimisePNGTask +buildscript { + dependencies.add 'classpath', 'org.spongepowered:vanillagradle:0.2.1-20240507.024226-82' +} + plugins { id('java') - id('org.spongepowered.gradle.vanilla') version '0.2.1-SNAPSHOT' - id('com.matyrobbrt.pngoptimiser') version '0.2.0' + id 'org.spongepowered.gradle.vanilla' version '0.2.1-20240507.024226-82' } archivesBaseName = "${mod_name}-common-${minecraft_version}" -tasks.register('optimise', OptimisePNGTask) { - file(fileTree(dir: sourceSets.main.resources.srcDirs[0], includes: ['**/*.png'])) - option 'i', 0 -} - minecraft { accessWideners(project.file("src/main/resources/byg.accesswidener")) version(minecraft_version) diff --git a/Fabric/build.gradle b/Fabric/build.gradle index 780c39f4e..dc54fbc20 100644 --- a/Fabric/build.gradle +++ b/Fabric/build.gradle @@ -3,8 +3,6 @@ import com.modrinth.minotaur.dependencies.DependencyType import com.modrinth.minotaur.dependencies.ModDependency import net.darkhax.curseforgegradle.TaskPublishCurseForge -import java.util.stream.Collectors - plugins { id 'fabric-loom' version '1.3-SNAPSHOT' id 'maven-publish' diff --git a/build.gradle b/build.gradle index 559f3c4c9..eea6e9027 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,3 @@ -import groovy.json.JsonOutput -import groovy.json.JsonSlurper - plugins { id 'java' id 'idea' @@ -71,24 +68,4 @@ subprojects { it.options.encoding = 'UTF-8' it.options.release.set(17) } - - if (project.name != 'Common') - jar { - doLast { - // Minifies all .json files when building the mod. - // Source files are not minified, only the jar copies. - def jsonMinifyStart = System.currentTimeMillis() - def jsonMinified = 0 - def jsonBytesSaved = 0 - - fileTree(dir: processResources.outputs.files.asPath, include: '**/*.json').each { - jsonMinified++ - def oldLength = it.length() - it.text = JsonOutput.toJson(new JsonSlurper().parse(it)) - jsonBytesSaved += oldLength - it.length() - } - - println('Minified ' + jsonMinified + ' json files. Saved ' + jsonBytesSaved + ' bytes. Took ' + (System.currentTimeMillis() - jsonMinifyStart) + 'ms.') - } - } } \ No newline at end of file