From 2572483d0b7232db98e59030897e1bb0f0d52af1 Mon Sep 17 00:00:00 2001 From: itsmeow Date: Wed, 1 Jul 2020 14:33:34 -0400 Subject: [PATCH] Fix 1.0.0 release --- build.gradle | 106 ++------------------------------------------------- 1 file changed, 3 insertions(+), 103 deletions(-) diff --git a/build.gradle b/build.gradle index d090b78..c26b7e7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,111 +1,11 @@ -buildscript { - repositories { - maven { - url = "https://plugins.gradle.org/m2/" - } - maven { - url = 'https://files.minecraftforge.net/maven' - } - mavenCentral() - jcenter() - } - dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true - } -} -apply plugin: net.minecraftforge.gradle.mcp.MCPPlugin -apply plugin: net.minecraftforge.gradle.userdev.UserDevPlugin -apply plugin: 'eclipse' -version = "${project.mc_version}-${project.mod_version}" -group = "${project.maven_group}" -archivesBaseName = "${project.mod_id}" -sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' -tasks.withType(JavaCompile) { - options.encoding = 'UTF-8' -} +apply from: 'https://maven.itsmeow.dev/scripts/fg3.gradle' +apply from: 'https://maven.itsmeow.dev/scripts/imdlib.gradle' repositories { - flatDir { - dirs 'libs' - } - maven { - name = "itsmeow maven" - url = "https://maven.itsmeow.dev/" - } maven { url = "https://maven.theillusivec4.top/" } } -minecraft { - mappings channel: project.mappings_channel, version: "${project.mappings_version}-${project.mappings_mc_version}" - runs { - client { - workingDirectory project.file('run') - property 'forge.logging.console.level', 'info' - mods.create("${project.mod_id}").source(sourceSets.main); - } - server { - workingDirectory project.file('run') - property 'forge.logging.console.level', 'info' - mods.create("${project.mod_id}").source(sourceSets.main); - } - } -} dependencies { - minecraft "net.minecraftforge:forge:${project.mc_version}-${project.forge_version}" runtimeOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-${curios_version}") compileOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-${curios_version}:api") -} -jar { - manifest { - mainAttributes( - "Maven-Artifact": "${project.maven_group}:${project.archivesBaseName}:${project.version}", - "Specification-Title": archivesBaseName, - "Specification-Vendor": "its_meow", - "Specification-Version": "1", - "Implementation-Title": archivesBaseName, - "Implementation-Version": "${project.mod_version}", - "Implementation-Vendor": "its_meow", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), - "Built-On-Java": "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})", - "Built-On": "${project.mc_version}-${project.forge_version}" - ) - } -} -task sourceJar(type: Jar, dependsOn: classes) { - description = 'Creates a JAR containing the source code.' - classifier = 'sources' - from sourceSets.main.allSource - manifest { - mainAttributes( - "Maven-Artifact": "${project.maven_group}:${project.archivesBaseName}:${project.version}", - "Specification-Title": archivesBaseName, - "Specification-Vendor": "its_meow", - "Specification-Version": "1", - "Implementation-Title": archivesBaseName + '-sources', - "Implementation-Version": "${project.mod_version}", - "Implementation-Vendor": "its_meow", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), - "Built-On-Java": "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})", - "Built-On": "${project.mc_version}-${project.forge_version}" - ) - } -} -apply from: 'https://maven.itsmeow.dev/scripts/maven.gradle' -import groovy.json.JsonSlurper -import groovy.json.JsonOutput -processResources { - doLast { - def jsonMinifyStart = System.currentTimeMillis() - def jsonMinified = 0 - def jsonBytesSaved = 0 - fileTree(dir: outputs.files.asPath, include: '**/*.json').each { - File file = it - jsonMinified++ - def oldLength = file.length() - file.text = JsonOutput.toJson(new JsonSlurper().parse(file)) - jsonBytesSaved += oldLength - file.length() - } - println('Minified ' + jsonMinified + ' json files. Saved ' + jsonBytesSaved + ' bytes. Took ' + (System.currentTimeMillis() - jsonMinifyStart) + 'ms.') - } -} -apply from: 'https://maven.itsmeow.dev/scripts/imdlib.gradle' \ No newline at end of file +} \ No newline at end of file