forked from Trinsdar/GTC-Expansion
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finished update to Vintage GregTech and the newest IC2C version
- Loading branch information
1 parent
a760132
commit 52c67d8
Showing
296 changed files
with
381 additions
and
554 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,145 +1,215 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
maven { url = "http://files.minecraftforge.net/maven" } | ||
} | ||
dependencies { | ||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' | ||
} | ||
import org.jetbrains.gradle.ext.Gradle | ||
|
||
plugins { | ||
id 'java' | ||
id 'java-library' | ||
id 'maven-publish' | ||
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7' | ||
id 'eclipse' | ||
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.30' | ||
id 'com.matthewprenger.cursegradle' version '1.4.0' | ||
} | ||
apply plugin: 'net.minecraftforge.gradle.forge' | ||
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. | ||
|
||
version = project.mod_version | ||
group = project.maven_group | ||
archivesBaseName = project.archives_base_name | ||
|
||
version = "${mod_version}" | ||
group = "gtc_expansion" // http://maven.apache.org/guides/mini/guide-naming-conventions.html | ||
archivesBaseName = "GTCExpansion" | ||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(8)) | ||
// Azul covers the most platforms for Java 8 toolchains, crucially including MacOS arm64 | ||
vendor.set(org.gradle.jvm.toolchain.JvmVendorSpec.AZUL) | ||
} | ||
// Generate sources and javadocs jars when building and publishing | ||
withSourcesJar() | ||
// withJavadocJar() | ||
} | ||
|
||
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. | ||
compileJava { | ||
sourceCompatibility = targetCompatibility = '1.8' | ||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' | ||
} | ||
|
||
minecraft { | ||
version = "${mc_version}-${forge_version}" | ||
runDir = "run" | ||
|
||
// the mappings can be changed at any time, and must be in the following format. | ||
// snapshot_YYYYMMDD snapshot are built nightly. | ||
// stable_# stables are built at the discretion of the MCP team. | ||
// Use non-default mappings at your own risk. they may not always work. | ||
// simply re-run your setup task after changing the mappings to update your workspace. | ||
mappings = "${mappings_version}" | ||
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. | ||
|
||
replace "@VERSION@", project.version | ||
replaceIn "GTCExpansion.java" | ||
configurations { | ||
embed | ||
implementation.extendsFrom(embed) | ||
} | ||
|
||
repositories{ | ||
maven { // JEI | ||
name 'DVS1 Maven FS' | ||
url 'http://dvs1.progwml6.com/files/maven/' | ||
} | ||
maven { // The One Probe | ||
name 'tterrag' | ||
url 'http://maven.tterrag.com/' | ||
jar { | ||
manifest { | ||
def attribute_map = [:] | ||
if (project.use_coremod.toBoolean()) { | ||
attribute_map['FMLCorePlugin'] = project.coremod_plugin_class_name | ||
if (project.include_mod.toBoolean()) { | ||
attribute_map['FMLCorePluginContainsFMLMod'] = true | ||
attribute_map['ForceLoadAsMod'] = project.gradle.startParameter.taskNames[0] == "build" | ||
} | ||
} | ||
if (project.use_access_transformer.toBoolean()) { | ||
attribute_map['FMLAT'] = 'embers_at.cfg' | ||
} | ||
attributes(attribute_map) | ||
} | ||
// Add all embedded dependencies into the jar | ||
from(provider { configurations.embed.collect { it.isDirectory() ? it : zipTree(it) } }) | ||
} | ||
|
||
minecraft { | ||
mcVersion = project.mc_version | ||
// MCP Mappings | ||
mcpMappingChannel = 'snapshot' | ||
mcpMappingVersion = '20171003' | ||
|
||
// Set username here, the UUID will be looked up automatically | ||
username = '_MasterEnderman_' | ||
|
||
// Add any additional tweaker classes here | ||
// extraTweakClasses.add('org.spongepowered.asm.launch.MixinTweaker') | ||
|
||
// Add various JVM arguments here for runtime | ||
def args = ["-ea:${project.group}"] | ||
if (project.use_coremod.toBoolean()) { | ||
args << '-Dfml.coreMods.load=' + coremod_plugin_class_name | ||
} | ||
maven { // Tesla | ||
name 'MMD' | ||
url 'https://maven.mcmoddev.com/' | ||
if (project.use_mixins.toBoolean()) { | ||
args << '-Dmixin.hotSwap=true' | ||
args << '-Dmixin.checks.interfaces=true' | ||
args << '-Dmixin.debug.export=true' | ||
} | ||
extraRunJvmArguments.addAll(args) | ||
|
||
// Include and use dependencies' Access Transformer files | ||
useDependencyAccessTransformers = true | ||
|
||
// Add any properties you want to swap out for a dynamic value at build time here | ||
// Any properties here will be added to a class at build time, the name can be configured below | ||
// Example: | ||
injectedTags.put('VERSION', project.version) | ||
// injectedTags.put('MOD_ID', project.archives_base_name) | ||
} | ||
|
||
repositories { | ||
maven { url "https://repo.spongepowered.org/maven" } | ||
maven { url "https://repo.cleanroommc.com/releases" } | ||
maven { url "https://dvs1.progwml6.com/files/maven" } | ||
maven { url "https://maven.blamejared.com/" } | ||
maven { url "https://www.ryanliptak.com/maven/" } | ||
maven { url "https://maven.thiakil.com/" } | ||
maven { | ||
name = "jared" | ||
url = "https://maven.blamejared.com" | ||
} | ||
maven { // CCL, CCC, NEI | ||
name 'Chickenbones Repo' | ||
url 'http://chickenbones.net/maven/' | ||
} | ||
maven { // CoFH | ||
name 'Covers Maven' | ||
url 'http://maven.covers1624.net/' | ||
name 'GTNH Maven' | ||
url 'https://nexus.gtnewhorizons.com/repository/public/' | ||
} | ||
maven { | ||
name = "buildcraft" | ||
url = "http://www.mod-buildcraft.com/maven/" | ||
name 'GTCEu Maven' | ||
url 'https://maven.gtceu.com' | ||
} | ||
maven { | ||
name = "ic2" | ||
url = "http://maven.ic2.player.to/" | ||
name 'CurseMaven' | ||
url 'https://cursemaven.com' | ||
content { | ||
includeGroup 'curse.maven' | ||
} | ||
} | ||
maven { | ||
url = "https://www.cursemaven.com" | ||
}/* | ||
maven { //Backup | ||
url "https://modmaven.k-4u.nl" | ||
}*/ | ||
mavenLocal() // Must be last for caching to work | ||
} | ||
|
||
dependencies { | ||
implementation 'org.jetbrains:annotations:19.0.0' | ||
deobfProvided "mezz.jei:jei_${mc_version}:${jei_version}:api" | ||
runtime "mezz.jei:jei_${mc_version}:${jei_version}" | ||
compile "curse.maven:ic2c-extras-302906:3087233" | ||
deobfCompile("mcjty.theoneprobe:TheOneProbe-1.12:1.12-1.4.22-13") { transitive = false } | ||
//runtime "curse.maven:ic2c-extras:3033496" | ||
deobfProvided("net.sengir.forestry:forestry_${mc_version}:${forestry_version}") { | ||
// Common: | ||
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2' | ||
annotationProcessor 'com.google.guava:guava:32.1.2-jre' | ||
annotationProcessor 'com.google.code.gson:gson:2.8.9' | ||
|
||
// RetroFuturaGradle: | ||
String mixinBooter = modUtils.enableMixins('zone.rong:mixinbooter:9.1') | ||
// modUtils.enableMixins('zone.rong:mixinbooter:9.1', 'mod_id.mixins.refmap.json') << add refmap name as 2nd arg (optional) | ||
api(mixinBooter) { | ||
transitive = false | ||
} | ||
runtime("net.sengir.forestry:forestry_${mc_version}:${forestry_version}") { | ||
annotationProcessor(mixinBooter) { | ||
transitive = false | ||
} | ||
compile "curse.maven:baubles-227083:2518667" | ||
compile "curse.maven:ic2_classic-242942:3093608" | ||
compile "curse.maven:gtclassic-324021:3059975" | ||
compileOnly "curse.maven:railcraft-51195:2687757" | ||
compileOnly "curse.maven:better_pipes-402834:3050661" | ||
compileOnly "curse.maven:twilight_forest-227639:3051450" | ||
runtime "curse.maven:railcraft-51195:2687757" | ||
runtime "curse.maven:better_pipes-402834:3050661" | ||
deobfProvided ("cofh:CoFHCore:${mc_version}-${cofhcore_version}:universal") { | ||
exclude group: 'mezz.jei' | ||
} | ||
|
||
if (getFile('dependencies.gradle').exists()) { | ||
apply from: 'dependencies.gradle' | ||
} | ||
|
||
// Adds Access Transformer files to tasks | ||
if (project.use_access_transformer.toBoolean()) { | ||
for (File at : sourceSets.getByName("main").resources.files) { | ||
if (at.name.toLowerCase().endsWith("_at.cfg")) { | ||
tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(at) | ||
tasks.srgifyBinpatchedJar.accessTransformerFiles.from(at) | ||
} | ||
} | ||
deobfCompile(group: 'CraftTweaker2', name: 'ZenScript', version: craft_tweaker_version) { | ||
exclude group: 'org.ow2.asm' | ||
exclude group: 'com.google.code.gson' | ||
} | ||
|
||
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 various properties in mcmod.info and pack.mcmeta if applicable | ||
filesMatching(['mcmod.info', 'pack.mcmeta']) { fcd -> | ||
// Replace version and mcversion | ||
fcd.expand( | ||
'version': project.version, | ||
'mcversion': project.minecraft.version | ||
) | ||
} | ||
deobfCompile(group: 'CraftTweaker2', name: 'CraftTweaker2-API', version: craft_tweaker_version) { | ||
exclude group: 'org.ow2.asm' | ||
exclude group: 'com.google.code.gson' | ||
|
||
if (project.use_access_transformer.toBoolean()) { | ||
rename '(.+_at.cfg)', 'META-INF/$1' // Make sure Access Transformer files are in META-INF folder | ||
} | ||
deobfCompile(group: 'CraftTweaker2', name: 'CraftTweaker2-MC1120-Main', version: "1.12-${craft_tweaker_version}") { | ||
exclude group: 'org.ow2.asm' | ||
exclude group: 'com.google.code.gson' | ||
} | ||
|
||
idea { | ||
module { | ||
inheritOutputDirs = true | ||
downloadSources = true | ||
} | ||
project { | ||
settings { | ||
runConfigurations { | ||
"1. Run Client"(Gradle) { | ||
taskNames = ["runClient"] | ||
} | ||
"2. Run Server"(Gradle) { | ||
taskNames = ["runServer"] | ||
} | ||
"3. Run Obfuscated Client"(Gradle) { | ||
taskNames = ["runObfClient"] | ||
} | ||
"4. Run Obfuscated Server"(Gradle) { | ||
taskNames = ["runObfServer"] | ||
} | ||
} | ||
compiler.javac { | ||
afterEvaluate { | ||
javacAdditionalOptions = "-encoding utf8" | ||
moduleJavacAdditionalOptions = [ | ||
(project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ') | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task deobfJar(type: Jar) { | ||
from sourceSets.main.output | ||
classifier = 'deobf' | ||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
artifactId archivesBaseName | ||
from components.java | ||
} | ||
} | ||
} | ||
|
||
artifacts { | ||
archives deobfJar | ||
tasks.named("processIdeaSettings").configure { | ||
dependsOn("injectTags") | ||
} | ||
|
||
// Helpers | ||
|
||
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 except the mcmod.info | ||
from(sourceSets.main.resources.srcDirs) { | ||
exclude 'mcmod.info' | ||
} | ||
} | ||
def getFile(String relativePath) { | ||
return new File(projectDir, relativePath) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
dependencies { | ||
implementation "org.jetbrains:annotations:24.0.0" | ||
|
||
// Dependencies | ||
implementation "CraftTweaker2:CraftTweaker2-API:" + project.crafttweaker | ||
implementation "CraftTweaker2:ZenScript:" + project.crafttweaker | ||
implementation "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-" + project.crafttweaker | ||
|
||
implementation rfg.deobf("curse.maven:had-enough-items-557549:" + project.hei) | ||
implementation rfg.deobf("curse.maven:the-one-probe-community-edition-885670:" + project.top) | ||
implementation("com.cleanroommc:groovyscript:" + project.groovyscript) { transitive = false } | ||
// so it doesn't installs JEI | ||
|
||
implementation "com.azanor.baubles:Baubles:1.12-" + project.baubles | ||
implementation rfg.deobf("curse.maven:ic2_classic-242942:" + project.ic2c) | ||
implementation rfg.deobf("curse.maven:vintage-gregtech-844311:" + project.vgt) | ||
|
||
// Compatibility | ||
compileOnly rfg.deobf("curse.maven:ic2c-extras-302906:" + project.ic2c_ex) | ||
|
||
if (project.compat_internal.toBoolean()) { | ||
runtimeOnly rfg.deobf("curse.maven:ic2c-extras-302906:" + project.ic2c_ex) | ||
runtimeOnly rfg.deobf("curse.maven:advanced-solars-classic-314835:" + project.advanced_solars) | ||
runtimeOnly rfg.deobf("curse.maven:gravisuit-classic-314829:" + project.gravisuit) | ||
runtimeOnly rfg.deobf("curse.maven:ic2c-additions-304040:" + project.ic2c_ad) | ||
runtimeOnly rfg.deobf("curse.maven:ic2c-crop-overrides-334346:" + project.ic2c_crop) | ||
runtimeOnly rfg.deobf("curse.maven:ic2c-custom-soils-350486:" + project.ic2c_soil) | ||
} | ||
|
||
forestry = "curse.maven:forestry-59751:" + project.forestry | ||
railcraft = "curse.maven:railcraft-51195:" + project.railcraft | ||
better_pipes = "curse.maven:better_pipes-402834:" + project.better_pipes | ||
twilight_forest = "curse.maven:twilight_forest-227639:" + project.twilight_forest | ||
redstone_flux = "curse.maven:redstone-flux-270789:" + project.redstone_flux | ||
cofh_core = "curse.maven:cofh-core-69162:" + project.cofh_core | ||
steve_carts = "curse.maven:steves-carts-reborn-253462:" + project.steve_carts | ||
|
||
compileOnly rfg.deobf(forestry) | ||
compileOnly rfg.deobf(railcraft) | ||
compileOnly rfg.deobf(better_pipes) | ||
compileOnly rfg.deobf(twilight_forest) | ||
compileOnly rfg.deobf(redstone_flux) | ||
compileOnly rfg.deobf(cofh_core) | ||
|
||
if (project.compat_external.toBoolean()) { | ||
runtimeOnly rfg.deobf(forestry) | ||
runtimeOnly rfg.deobf(railcraft) | ||
runtimeOnly rfg.deobf(better_pipes) | ||
runtimeOnly rfg.deobf(twilight_forest) | ||
runtimeOnly rfg.deobf(redstone_flux) | ||
runtimeOnly rfg.deobf(cofh_core) | ||
runtimeOnly rfg.deobf("curse.maven:reborncore-237903:" + project.reborncore) | ||
runtimeOnly rfg.deobf(steve_carts) | ||
runtimeOnly rfg.deobf("curse.maven:sc-ic2c-compat-409410:" + project.sc_ic2c_compat) | ||
} | ||
|
||
// Runtime dependencies | ||
runtimeOnly rfg.deobf("curse.maven:vintagefix-871198:" + project.vintagefix) | ||
runtimeOnly rfg.deobf("curse.maven:startup-timer-782070:" + project.startuptimer) | ||
|
||
runtimeOnly "com.cleanroommc:configanytime:" + project.configanytime | ||
runtimeOnly rfg.deobf("curse.maven:red-core-873867:" + project.redcore) | ||
runtimeOnly rfg.deobf("curse.maven:alfheim-lighting-engine-910715:" + project.alfheim) | ||
runtimeOnly rfg.deobf("curse.maven:valkyrie-874067:" + project.valkyrie) | ||
} |
Oops, something went wrong.