diff --git a/.pomrc b/.pomrc new file mode 100644 index 0000000000..626c92528f --- /dev/null +++ b/.pomrc @@ -0,0 +1,37 @@ +{ + "name": "Galacticraft-Legacy", + "url": "https://github.com/TeamGalacticraft/Galacticraft-Legacy", + "description": "An advanced space exploration mod for Minecraft", + "inceptionYear": "2021", + "organization": { + "name": "TeamGalacticraft", + "url": "https://github.com/TeamGalacticraft" + }, + "licenses": [ + { + "name": "MIT", + "url": "https://github.com/TeamGalacticraft/Galacticraft-Legacy/blob/master/LICENSE", + "distribution": "repo" + } + ], + "issueManagement": { + "system": "github", + "url": "https://github.com/TeamGalacticraft/Galacticraft-Legacy/issues" + }, + "scm": { + "connection": "scm:git:git://github.com/TeamGalacticraft/Galacticraft-Legacy.git", + "developerConnection": "scm:git:git@github.com:TeamGalacticraft/Galacticraft-Legacy.git", + "url": "https://github.com/TeamGalacticraft/Galacticraft-Legacy" + }, + "developers": [ + { + "id": "rom", + "name": "ROMVoid95", + "email": "rom.void95@gmail.com", + "roles": [ + "developer" + ], + "timezone": "CST/CDT" + } + ] +} diff --git a/build.gradle b/build.gradle index 54e4293d8c..cde56f8b54 100644 --- a/build.gradle +++ b/build.gradle @@ -1,194 +1,51 @@ -buildscript { - dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true - } -} - plugins { id 'java' id 'eclipse' id 'io.freefair.lombok' version '6.5.0.2' - id 'wtf.gofancy.fancygradle' version '1.+' id 'org.cadixdev.licenser' version '0.6.1' + id 'net.galacticraft.internal.maven' version '1.0.0' + id 'net.galacticraft.internal.legacy.defaults' version '1.0.0' } -apply plugin: 'net.minecraftforge.gradle' java.toolchain.languageVersion = JavaLanguageVersion.of(8) group = "micdoodle8.mods.galacticraft" archivesBaseName = "Galacticraft" -version = '4.0.4-SNAPSHOT' +version = "${mod_version}${version_suffix}" repositories { mavenCentral() maven { name 'galacticraft' - url 'https://maven.galacticraft.net/repository/legacy-common/' - } - maven { - name 'buildcraft' - url 'https://mod-buildcraft.com/maven/' - content { includeGroup 'com.mod-buildcraft' } - } - maven { - name 'ic2' - url 'https://maven.ic2.player.to' - content { includeGroup 'net.industrial-craft' } - } - maven { - name 'prog' - url 'https://dvs1.progwml6.com/files/maven' - content { includeGroup 'mezz.jei' } - } - maven { - name 'opencomputers' - url 'https://maven.cil.li/' - content { includeGroup 'li.cil.oc' } - } - maven { - name 'BlameJared - Crafttweaker' - url 'https://maven.blamejared.com/' - content { includeGroup 'CraftTweaker2' } - } - maven { - name 'cc-tweaked' - url 'https://squiddev.cc/maven/' - content { includeGroup 'org.squiddev' } - } - - all { - ArtifactRepository repo -> - if (repo instanceof MavenArtifactRepository) { - if ((repo.url.toString() == 'files.minecraftforge.net') || - (repo.url.toString() == 'maven.minecraftforge.net')) { - remove repo - } - } + url 'https://maven.galacticraft.net/repository/legacy-common/' } } configurations { - compileOnly.extendsFrom compileMod + compileOnly.extendsFrom compileRequire } dependencies { minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}" - - compileMod fg.deobf('mod.dependency:biomes-o-plenty:7.0.1.2445') - compileMod fg.deobf('mod.dependency:mekanism:9.8.3.390') - compileMod fg.deobf('mod.dependency:appliedenergistics2:rv6-stable-7') - compileMod fg.deobf('mod.dependency:redstoneflux:2.1.1.1') - compileMod fg.deobf('mod.dependency:actuallyadditions:r152') - compileMod fg.deobf('mod.dependency:playerapi:1.1') - compileMod fg.deobf('mod.dependency:industrialcraft-2:2.8.222-ex112') - compileMod fg.deobf('mod.dependency:journeymap:5.7.1') - compileMod fg.deobf('mod.dependency:buildcraft-api:7.99.24.8') - compileMod fg.deobf('mod.dependency:jei:4.16.1.302:api') - runtimeOnly fg.deobf('mod.dependency:jei:4.16.1.302') -} - -minecraft { - mappings channel: "${mapping_channel}", version: "${mapping_version}" - accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') - - runs { - client { - workingDirectory project.file('run') - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' - if (project.hasProperty('uuid')) - args '--uuid', project.getProperty('uuid') - if (project.hasProperty('username')) - args '--username', project.getProperty('username') - jvmArg '-Dfml.coreMods.load=micdoodle8.mods.miccore.MicdoodlePlugin' - } - server { - workingDirectory project.file('run') - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' - jvmArg '-Dfml.coreMods.load=micdoodle8.mods.miccore.MicdoodlePlugin' - } - } -} - -fancyGradle { - patches { - resources - coremods - asm - } -} - -def setManifest = { Manifest manifest-> - manifest.attributes( - [ - 'Specification-Title' : 'Galacticraft', - 'Specification-Vendor' : 'TeamGalacticraft', - 'Specification-Version' : "${version}", - 'Implementation-Title' : 'Galacticraft', - 'Implementation-Version' : "${version}", - 'Implementation-Vendor' : 'TeamGalacticraft', - 'Implementation-Build-Date' : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), - 'FMLAT' : 'accesstransformer.cfg', - 'FMLCorePluginContainsFMLMod' : 'true', - 'FMLCorePlugin' : 'micdoodle8.mods.miccore.MicdoodlePlugin', - 'Built-On-Minecraft' : "${mc_version}", - 'Built-On-Forge' : "${forge_version}", - 'Built-On-Mapping' : "${mapping_channel}-${mapping_version}", - 'Built-Using' : "ForgeGradle: 5.1.+" - ] as LinkedHashMap - ) -} - -jar { - manifest(setManifest) - archiveVersion.set("${mc_version}-${version}") -} - -jar.finalizedBy('reobfJar') - -task sourcesJar(type: Jar, dependsOn: classes) { - duplicatesStrategy(DuplicatesStrategy.FAIL) - archiveClassifier.set('sources') - archiveVersion.set("${mc_version}-${version}") - from sourceSets.main.allSource -} - -task deobfJar(type: Jar) { - duplicatesStrategy(DuplicatesStrategy.FAIL) - archiveClassifier.set('deobf') - archiveVersion.set("${mc_version}-${version}") - from sourceSets.main.output - from sourceSets.main.allJava - manifest(setManifest) -} - -task mavenJar(type: Jar) { - duplicatesStrategy(DuplicatesStrategy.INCLUDE) - manifest(setManifest) - archiveVersion.set("${mc_version}-${version}-maven") - from(sourceSets.main.output) { - exclude 'micdoodle8/mods/miccore/IntCache.*' - } - from("${projectDir}/etc/replace") { - include 'IntCache.class' - into 'micdoodle8/mods/miccore' - } -} - -artifacts { - archives deobfJar - archives sourcesJar - archives mavenJar + compileRequire fg.deobf('mod.dependency:mekanism:9.8.3.390') + compileRequire fg.deobf('mod.dependency:industrialcraft-2:2.8.222-ex112') + compileRequire fg.deobf('mod.dependency:buildcraft-api:7.99.24.8') + compileOnly fg.deobf('mod.dependency:biomes-o-plenty:7.0.1.2445') + compileOnly fg.deobf('mod.dependency:appliedenergistics2:rv6-stable-7') + compileOnly fg.deobf('mod.dependency:redstoneflux:2.1.1.1') + compileOnly fg.deobf('mod.dependency:actuallyadditions:r152') + compileOnly fg.deobf('mod.dependency:playerapi:1.1') + compileOnly fg.deobf('mod.dependency:journeymap:5.7.1') + compileOnly fg.deobf('mod.dependency:jei:4.16.1.302:api') + runtimeOnly fg.deobf('mod.dependency:jei:4.16.1.302') } -apply from: 'gradle/maven.gradle' apply from: 'gradle/resources.gradle' license { - header = project.file('etc/license/HEADER') + header = project.file('etc/HEADER') properties { company = 'Team Galacticraft' year = Calendar.getInstance().get(Calendar.YEAR); diff --git a/etc/license/HEADER b/etc/HEADER similarity index 100% rename from etc/license/HEADER rename to etc/HEADER diff --git a/OLD_LICENSE.txt b/etc/OLD_LICENSE.txt similarity index 100% rename from OLD_LICENSE.txt rename to etc/OLD_LICENSE.txt diff --git a/gradle.properties b/gradle.properties index cb9974609f..b8d3b0d230 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,16 @@ org.gradle.daemon=false -mc_version = 1.12.2 -forge_version = 14.23.5.2860 -mapping_channel = stable -mapping_version = 39-1.12 +internal.maven.sign=false + +mc_version=1.12.2 +forge_version=14.23.5.2860 +mapping_channel=stable +mapping_version=39-1.12 + +mod_version=4.0.4 +version_suffix= ##Allows using your skin while testing, This can be with or without hyphens -##uuid = -##username = -##accessToken = +##uuid = +##username = +##accessToken = diff --git a/gradle/maven.gradle b/gradle/maven.gradle deleted file mode 100644 index 3a078e4bd7..0000000000 --- a/gradle/maven.gradle +++ /dev/null @@ -1,86 +0,0 @@ -apply plugin: "maven-publish" -apply plugin: 'signing' - -def defaultFolder = project.rootProject.file('repo') - -publishing { - repositories { - maven { - name 'Releases' - url 'https://maven.galacticraft.net/repository/legacy-releases/' - credentials { - username = project.hasProperty('NEXUS_USER') ? project.NEXUS_USER : '' - password = project.hasProperty('NEXUS_PASSWORD') ? project.NEXUS_PASSWORD : '' - } - } - maven { - name 'Snapshots' - url 'https://maven.galacticraft.net/repository/legacy-snapshots/' - credentials { - - username = System.getenv().NEXUS_USER == null ? project.hasProperty('NEXUS_USER') ? project.NEXUS_USER : '' : System.getenv().NEXUS_USER - password = System.getenv().NEXUS_PASSWORD == null ? project.hasProperty('NEXUS_PASSWORD') ? project.NEXUS_PASSWORD : '' : System.getenv().NEXUS_PASSWORD - } - } - maven { - name 'ProjectDirectory' - url 'file://' + defaultFolder.getAbsolutePath() - } - } - publications { - galacticraft(MavenPublication) { - groupId 'dev.galacticraft' - artifactId 'galacticraft-legacy' - version version - - artifact mavenJar - artifact deobfJar - artifact sourcesJar - - pom { - name = 'Galacticraft' - description = 'An advanced space exploration mod for Minecraft' - url = 'https://github.com/TeamGalacticraft/Galacticraft-Legacy' - scm { - url = 'https://github.com/TeamGalacticraft/Galacticraft-Legacy' - connection = 'scm:git:git://github.com/TeamGalacticraft/Galacticraft-Legacy.git' - developerConnection = 'scm:git:git@github.com:TeamGalacticraft/Galacticraft-Legacy.git' - } - issueManagement { - system = 'github' - url = 'https://github.com/TeamGalacticraft/Galacticraft-Legacy/issues' - } - - licenses { - license { - name = 'custom' - url = 'https://github.com/TeamGalacticraft/Galacticraft-Legacy/blob/master/LICENSE.txt' - } - } - withXml { - def reposNode = asNode().appendNode('repositories') - def repoNode = reposNode.appendNode('repository') - - repoNode.appendNode('id', 'legacy-common') - repoNode.appendNode('name', 'Legacy Common') - repoNode.appendNode('url', 'https://maven.galacticraft.net/repository/legacy-common/') - - def depsNode = asNode().appendNode('dependencies') - project.configurations.compileMod.allDependencies.each { dep -> - def depNode = depsNode.appendNode('dependency') - - depNode.appendNode('groupId', dep.getGroup()) - depNode.appendNode('artifactId', dep.getName()) - depNode.appendNode('version', dep.getVersion().replace('_mapped_stable_39-1.12', '')) - depNode.appendNode('scope', 'compile') - } - } - } - } - } - signing { - publishing.publications.each { - sign it - } - } -} diff --git a/settings.gradle b/settings.gradle index 3000f56e5d..a3750a4fbf 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,10 +1,7 @@ pluginManagement { repositories { maven { - url = 'https://maven.galacticraft.net/repository/common-proxy/' - } - maven { - url = 'https://repo.galacticraft.net/repository/maven-common/' + url = 'https://maven.galacticraft.net/repository/gradle/' } } } \ No newline at end of file diff --git a/src/main/resources/assets/galacticraftplanets/recipes/mars_machine_4.json b/src/main/resources/assets/galacticraftplanets/recipes/mars_machine_4.json index 15d416607b..7106d74b34 100644 --- a/src/main/resources/assets/galacticraftplanets/recipes/mars_machine_4.json +++ b/src/main/resources/assets/galacticraftplanets/recipes/mars_machine_4.json @@ -1,26 +1,26 @@ -{ - "result": { - "item": "galacticraftplanets:mars_machine", - "data": 4 - }, - "pattern": [ - "XYX", - "XZX", - "XYX" - ], - "type": "galacticraftplanets:replacable", - "key": { - "X": { - "type": "galacticraftcore:advanced_metal", - "metal": "desh_plate" - }, - "Y": { - "item": "galacticraftplanets:item_basic_mars", - "data": 3 - }, - "Z": { - "item": "minecraft:bed", - "data": 32767 - } - } -} \ No newline at end of file +{ + "result": { + "item": "galacticraftplanets:mars_machine", + "data": 4 + }, + "pattern": [ + "XYX", + "XZX", + "XYX" + ], + "type": "galacticraftplanets:replacable", + "key": { + "X": { + "type": "galacticraftcore:advanced_metal", + "metal": "desh_plate" + }, + "Y": { + "item": "galacticraftplanets:item_basic_mars", + "data": 3 + }, + "Z": { + "item": "minecraft:bed", + "data": 32767 + } + } +}