diff --git a/forge-1.13.2/build.gradle b/forge-1.13.2/build.gradle index b62c886b..461a03bf 100644 --- a/forge-1.13.2/build.gradle +++ b/forge-1.13.2/build.gradle @@ -13,6 +13,7 @@ buildscript { } apply plugin: 'net.minecraftforge.gradle' +apply plugin: 'eclipse' dependencies { compile project(":DynmapCore") @@ -30,74 +31,38 @@ repositories { url = 'http://files.minecraftforge.net/maven' } } + minecraft { mappings channel: 'snapshot', version: '20180921-1.13' runs { - client { - workingDirectory project.file('run') - - // Recommended logging data for a userdev environment - property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' - - // Recommended logging level for the console - property 'forge.logging.console.level', 'debug' - - mods { - dynmap { - source sourceSets.main - } - } - } - server { - workingDirectory project.file('run') - - // Recommended logging data for a userdev environment - property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' - - // Recommended logging level for the console - property 'forge.logging.console.level', 'debug' - - mods { - dynmap { - source sourceSets.main - } - } + workingDirectory project.file('run').canonicalPath } } - //replaceIn "Version.java" - //replace "@VERSION@", project.version + '-' + project.ext.buildNumber - //replace "@BUILD_NUMBER@", project.ext.buildNumber + replaceIn "Version.java" + replace "@VERSION@", project.version + '-' + project.ext.buildNumber + replace "@BUILD_NUMBER@", project.ext.buildNumber } project.archivesBaseName = "${project.archivesBaseName}-forge-1.13.2" processResources { + inputs.property "version", project.version + '-' + project.ext.buildNumber + // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info' + include 'META-INF/mods.toml' // replace version and mcversion - expand( - version: project.version + '-' + project.ext.buildNumber, - mcversion: "1.13.2" - ) + expand version: project.version + '-' + project.ext.buildNumber } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { - exclude 'mcmod.info' + include 'META-INF/mods.toml' } - // Move access transformer to META-INF - rename '(.+_at.cfg)', 'META-INF/$1' -} - -jar { - manifest { - attributes 'FMLAT': 'dynmap_at.cfg' - } } shadowJar { @@ -124,10 +89,13 @@ shadowJar.doLast { ant.checksum file: task.archivePath } - -//reobf { -// mappings channel: 'snapshot', version: '20180921-1.13' -//} +afterEvaluate { +reobf { + shadowJar { + mappings = createMcpToSrg.output + } +} +} task deobfJar(type: Jar) { from sourceSets.main.output diff --git a/forge-1.13.2/src/main/resources/META-INF/mods.toml b/forge-1.13.2/src/main/resources/META-INF/mods.toml index 7e24d147..bd638a88 100644 --- a/forge-1.13.2/src/main/resources/META-INF/mods.toml +++ b/forge-1.13.2/src/main/resources/META-INF/mods.toml @@ -3,7 +3,7 @@ loaderVersion="[25,)" issueTrackerURL="https://github.com/webbukkit/dynmap/issues" [[mods]] modId="dynmap" -version="${file.jarVersion}" +version="${version}" displayName="Dynmap" #updateJSONURL="http://myurl.me/" #optional #displayURL="http://example.com/" #optional @@ -14,6 +14,7 @@ authors="mikeprimm" description=''' Dynamic, Google-maps style rendered maps for your Minecraft server ''' + [[dependencies.dynmap]] modId="forge" mandatory=true