diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-12-18 22:39:39 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-12-18 22:39:39 +0000 |
commit | 3f621510092078d8b7de66d29661f1a779b326b5 (patch) | |
tree | 15717978b5fe68d5838d26f8bf1e71d33c19d89e | |
parent | 4c61569581179dd0f924b7594871d15c9f1a564d (diff) | |
download | GT5-Unofficial-3f621510092078d8b7de66d29661f1a779b326b5.tar.gz GT5-Unofficial-3f621510092078d8b7de66d29661f1a779b326b5.tar.bz2 GT5-Unofficial-3f621510092078d8b7de66d29661f1a779b326b5.zip |
+ Added a new Build Script.
- Removed all libraries found via Maven.
$ Fixed Minor Crash.
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | .project | 6 | ||||
-rw-r--r-- | build.gradle | 225 | ||||
-rw-r--r-- | build.properties | 7 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/COPYRIGHT.MD | 18 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java | 2 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java | 9 |
7 files changed, 172 insertions, 102 deletions
diff --git a/.gitignore b/.gitignore index 9edc02f6d4..bd55342d81 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,10 @@ scripts /src/Java/gtPlusPlus/xmod/thermalfoundation/asm/OreDictionaryArbiter_ASM.java /GeneratedIcons /unused libs +/world +/server.properties +/servers.dat +/GregTech.cfg +/GregTech.lang +/GTPP.dat +/PlayerCache.dat @@ -11,6 +11,11 @@ </arguments> </buildCommand> <buildCommand> + <name>org.eclipse.buildship.core.gradleprojectbuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name> <arguments> </arguments> @@ -19,5 +24,6 @@ <natures> <nature>org.eclipse.jdt.core.javanature</nature> <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature> + <nature>org.eclipse.buildship.core.gradleprojectnature</nature> </natures> </projectDescription> diff --git a/build.gradle b/build.gradle index 88a082e793..381e6dab71 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,15 @@ buildscript { repositories { - jcenter() mavenCentral() - maven { - name = "forge" - url = "http://files.minecraftforge.net/maven" - } + jcenter() + //maven { + // name = "forge" + // url = "http://files.minecraftforge.net/maven" + //} + maven { + name = "gt" + url = "https://gregtech.overminddl1.com/" + } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" @@ -20,103 +24,135 @@ buildscript { } } -apply plugin: 'forge' -apply plugin: 'idea' -apply plugin: 'java' -apply plugin: 'maven' -apply plugin: 'se.bjurr.gitchangelog.git-changelog-gradle-plugin' - -idea { module { inheritOutputDirs = true } } - +// Because Forge is too stupid to fix Deprecation Issues, and we cannot fix it on our end! (until we fork Forge) +allprojects { + tasks.withType(JavaCompile) { + //options.compilerArgs << "-Xlint:deprecation" + } + tasks.withType(Javadoc) { +- options.addStringOption('Xdoclint:none', '-quiet') +- } +} -sourceSets { - main { - java { srcDirs = ["$projectDir/src/Java"] } - resources { srcDirs = ["$projectDir/src/resources"] } - } +apply plugin: 'eclipse' +eclipse { + classpath { + downloadJavadoc = true + downloadSources = true + } } -configurations { - //fatJar +apply plugin: 'idea' +idea{ + module { + downloadJavadoc = true + downloadSources = true + } } -dependencies { - compile fileTree(dir: 'libs', include: '*.jar') - //testCompile 'junit:junit:4.12' - //fatJar files('libs/Segment-2.1.1.jar') +apply plugin: 'forge' + +file "build.properties" withReader { + def prop = new Properties() + prop.load(it) + ext.config = new ConfigSlurper().parse prop } + +apply plugin: 'se.bjurr.gitchangelog.git-changelog-gradle-plugin' + +version = "${config.gtpp.version}" +group= "gtPlusPlus" +archivesBaseName = "GT-PlusPlus" + + //Java Version -sourceCompatibility = JavaVersion.VERSION_1_8 -targetCompatibility = JavaVersion.VERSION_1_8 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 //Compile against UTF-8 -compileJava.options.encoding = 'UTF-8' compileTestJava.options.encoding = 'UTF-8' javadoc.options.encoding = 'UTF-8' - -//Jar Info -archivesBaseName = "GT-PlusPlus" -version = "1.7.02.99-pre" -minecraft.version = "1.7.10-10.13.4.1614-1.7.10" +compileJava.options.encoding = 'UTF-8' minecraft { - version = "1.7.10-10.13.4.1614-1.7.10" - runDir = "$projectDir" + version = "${config.minecraft.version}-${config.forge.version}" + runDir = "eclipse" } -//Gradle Tweak -//Prevent java 8's strict doclint for javadocs from failing builds -allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } +idea { module { inheritOutputDirs = true } } + +configurations { + provided + embedded + compile.extendsFrom provided, embedded } -//Maven repositories { maven { + name = "gt" + url = "http://gregtech.overminddl1.com/" + } + maven { name = "ic2" url = "http://maven.ic2.player.to/" } } -task discordChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { - file = new File("CHANGELOG Basic ${project.version}.txt"); - untaggedName = "Current Basic release ${project.version}" - fromCommit = "aa9f04218e5298414f900b9fe61131f7ed26b8f1" - toRef = "HEAD" - templateContent = file('changeloggeneral.mustache').getText('UTF-8') -} -task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { - file = new File("CHANGELOG ${project.version}.md"); - untaggedName = "Current release ${project.version}" - fromCommit = "aa9f04218e5298414f900b9fe61131f7ed26b8f1" - toRef = "HEAD" - templateContent = file('changelog.mustache').getText('UTF-8') +sourceSets { + main { + java { srcDirs = ["$projectDir/src/Java"] } + resources { srcDirs = ["$projectDir/src/resources"] } + } } -task curseChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { - file = new File("CHANGELOG Curse ${project.version}.md"); - untaggedName = "Current Curse release ${project.version}" - fromCommit = "aa9f04218e5298414f900b9fe61131f7ed26b8f1" - toRef = "HEAD" - templateContent = file('changelogcurse.mustache').getText('UTF-8') + +dependencies { + + provided "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev" + + compile "mcp.mobius.waila:Waila:1.5.11-RC2-NONEI_1.7.10:dev" + compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev" + compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev" + compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev" + + compile "com.enderio.core:EnderCore:1.7.10-0.2.0.39_beta:dev" + compile "com.enderio:EnderIO:1.7.10-2.3.0.430_beta:dev" + + compile "cofh:CoFHCore:1.7.10R3.0.4:dev" + compile "cofh:CoFHLib:1.7.10R3.0.3:dev" + compileOnly "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev" + compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev" + + //compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev" + //compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev" + + compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev" + compile "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf" + + compile fileTree(dir: 'libs', include: '*.jar') } -//task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { -// file = new File("CHANGELOG.md"); -// templateContent = file('changelog.mustache').getText('UTF-8'); -//} -jar { - archiveName = archivesBaseName + "-" + version + ".jar" - manifest { - attributes 'FMLCorePlugin': 'gtPlusPlus.preloader.asm.Preloader_FMLLoadingPlugin' - attributes 'FMLCorePluginContainsFMLMod': 'true' +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' } - //from configurations.fatJar.collect { it.isDirectory() ? it : zipTree(it) } + exclude '**/Thumbs.db' } - task sourceJar(type: Jar) { from sourceSets.main.allSource classifier = 'sources' @@ -135,6 +171,28 @@ task devJar(type: Jar) { } } +task discordChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { + file = new File("build/changelog/Basic ${project.version}.txt"); + untaggedName = "Current Basic release ${project.version}" + fromCommit = "${config.commit.hash}" + toRef = "HEAD" + templateContent = file('changeloggeneral.mustache').getText('UTF-8') +} +task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { + file = new File("build/changelog/${project.version}.md"); + untaggedName = "Current release ${project.version}" + fromCommit = "${config.commit.hash}" + toRef = "HEAD" + templateContent = file('changelog.mustache').getText('UTF-8') +} +task curseChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { + file = new File("build/changelog/Curse ${project.version}.md"); + untaggedName = "Current Curse release ${project.version}" + fromCommit = "${config.commit.hash}" + toRef = "HEAD" + templateContent = file('changelogcurse.mustache').getText('UTF-8') +} + artifacts { archives devJar archives sourceJar @@ -142,27 +200,4 @@ artifacts { build.finalizedBy(gitChangelogTask) build.finalizedBy(curseChangelogTask) -build.finalizedBy(discordChangelogTask) - -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' - exclude '**/*.md' - } -} - -def getBuildNumber() { - return "$System.env.BUILD_NUMBER" != "null" ? "$System.env.BUILD_NUMBER" : "0" -} +build.finalizedBy(discordChangelogTask)
\ No newline at end of file diff --git a/build.properties b/build.properties new file mode 100644 index 0000000000..5c691ec259 --- /dev/null +++ b/build.properties @@ -0,0 +1,7 @@ +minecraft.version=1.7.10 +forge.version=10.13.4.1614-1.7.10 +ic2.version=2.2.790-experimental +gt.version=5.09.31 +gtpp.version=1.7.04 + +commit.hash=aa9f04218e5298414f900b9fe61131f7ed26b8f1
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/COPYRIGHT.MD b/src/Java/gtPlusPlus/COPYRIGHT.MD new file mode 100644 index 0000000000..6c199fa5fe --- /dev/null +++ b/src/Java/gtPlusPlus/COPYRIGHT.MD @@ -0,0 +1,18 @@ +COPYRIGHT TEMPLATE + +Copyright (c) ${date} AlkCorp. + +All rights reserved. +Distribution of the software in any form is only allowed with explicit, +prior permission from the owner. + +This class is provided freely and may be decompiled and modified for private use, +either with a decompiler or a bytecode editor. Public use of modified or derivative versions +is prohibited unless you are given specific written permission. + +Distribution of the source code, modified (including custom compilation) or otherwise, +is prohibited by anyone except the author, except in the case of a derivative mod that has +been given prior approval. Creating derivative works for commercial use is expressly forbidden +and the owner reserves full right to seek damages. + +Contributors: https://github.com/alkcorp/GTplusplus/graphs/contributors
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java index 4d38e686cf..71cb15474b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java @@ -188,6 +188,8 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase } } } + + // TODO - Fix Casing Count return true; } diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java b/src/Java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java index 326789d7e2..92d711101b 100644 --- a/src/Java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java +++ b/src/Java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java @@ -25,7 +25,7 @@ public class CustomKineticRotor extends Item implements IKineticRotor { private final int mTier; @SideOnly(Side.CLIENT) - private final IIcon[] mTextures; + private IIcon[] mTextures; private static final String[] mRegistrationNames = new String[] { "itemwoodrotor", "itemironrotor", "itemsteelrotor", "itemwcarbonrotor" @@ -72,12 +72,6 @@ public class CustomKineticRotor extends Item implements IKineticRotor { public CustomKineticRotor(int aTier) { mTier = aTier; - if (Utils.isClient()) { - mTextures = new IIcon[6]; - } - else { - mTextures = null; - } this.setMaxStackSize(1); // Handle Differences if EIO is not loaded if (!LoadedMods.EnderIO && (aTier == 0 || aTier == 2)) { @@ -274,6 +268,7 @@ public class CustomKineticRotor extends Item implements IKineticRotor { @Override public void registerIcons(IIconRegister iconRegister) { int aIndex = 0; + mTextures = new IIcon[6]; for (String y : mUnlocalNames) { mTextures[aIndex++] = iconRegister.registerIcon(IC2.textureDomain + ":" + "rotors/" + y); } |