mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-25 06:14:25 +00:00
- Made forge version configurable
- Improved configuration structure
This commit is contained in:
1 parent
98d4932764
commit
8e99c0ff9e
18 files changed
+155
-110
No files matched your search
@@ -5,10 +5,6 @@ apply plugin: 'java'
|
||||
sourceCompatibility = '1.6'
|
||||
targetCompatibility = '1.6'
|
||||
|
||||
task run << {
|
||||
println "I'm a library!"
|
||||
}
|
||||
|
||||
task makeRegistry(type: RegisterZenClassesTask) {
|
||||
inputDir = file('build/classes/main')
|
||||
outputDir = file('build/classes/main')
|
||||
|
||||
@@ -15,6 +15,11 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion164
|
||||
}
|
||||
|
||||
|
||||
version = "1.6.4-" + ext.mineTweakerVersion
|
||||
//group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = project.projectDir.name
|
||||
@@ -34,10 +39,6 @@ task makeRegistry(type: RegisterZenClassesTask) {
|
||||
|
||||
tasks.jar.dependsOn(makeRegistry)
|
||||
|
||||
minecraft {
|
||||
version = "1.6.4-9.11.1.964"
|
||||
}
|
||||
|
||||
processResources
|
||||
{
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
@@ -48,12 +49,6 @@ processResources
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||
}
|
||||
|
||||
from(sourceSets.main.java.srcDirs) {
|
||||
include 'minetweaker/mc164/MineTweakerMod.java'
|
||||
|
||||
expand 'version':project.version
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
|
||||
@@ -12,13 +12,18 @@ buildscript {
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.6.4-9.11.1.964"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion164
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.6.4-9.11.1.964"}
|
||||
|
||||
minecraft{
|
||||
version = forgeVersion164
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.6.4-9.11.1.964"}
|
||||
|
||||
minecraft{
|
||||
version = forgeVersion164
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.6.4-9.11.1.964"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion164
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.10-10.13.0.1180"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion1710
|
||||
}
|
||||
|
||||
version = "1.7.10-" + ext.mineTweakerVersion
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.10-10.13.0.1180"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion1710
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.10-10.13.0.1180"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion1710
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.10-10.13.0.1180"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion1710
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.10-10.13.0.1180"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion1710
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.2-10.12.2.1121"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion172
|
||||
}
|
||||
|
||||
version = "1.7.2-" + ext.mineTweakerVersion
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.2-10.12.2.1121"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion172
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.2-10.12.2.1121"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion172
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.2-10.12.2.1121"}
|
||||
|
||||
minecraft {
|
||||
version = forgeVersion172
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
+34
-77
@@ -7,76 +7,57 @@ subprojects {
|
||||
apply from: rootProject.file('common.gradle')
|
||||
}
|
||||
|
||||
|
||||
task mergedJavadoc(type: Javadoc, description: 'Creates Javadoc from all the projects.') {
|
||||
title = 'All modules'
|
||||
destinationDir = new File(project.buildDir, 'merged-javadoc')
|
||||
|
||||
// Note: The closures below are executed lazily.
|
||||
source {
|
||||
subprojects*.sourceSets*.main*.allSource
|
||||
}
|
||||
classpath.from {
|
||||
subprojects*.configurations*.compile*.copyRecursive({ !(it instanceof ProjectDependency); })*.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') {
|
||||
gradleVersion = '1.11'
|
||||
}
|
||||
|
||||
subprojects.each { subproject -> evaluationDependsOn( subproject.path ) }
|
||||
|
||||
task setupDecompWorkspaceAll(dependsOn:
|
||||
projects164.collect { ':' + it + ":setupDecompWorkspace" }
|
||||
+ projects172.collect { ':' + it + ":setupDecompWorkspace" }
|
||||
+ projects1710.collect { ':' + it + ":setupDecompWorkspace" }) {}
|
||||
|
||||
task assembleMC1710(type: Jar, dependsOn: [\
|
||||
':ZenScript:build',
|
||||
':MineTweaker3-API:build',
|
||||
':MineTweaker3-MC1710-Main:build',
|
||||
':MineTweaker3-MC1710-Mod-IC2:build',
|
||||
':MineTweaker3-MC1710-Mod-NEI:build',
|
||||
':MineTweaker3-MC1710-Mod-MFR:build',
|
||||
':MineTweaker3-MC1710-Mod-GregTech:build']) {
|
||||
':MineTweaker3-API:build']
|
||||
+ projects1710.collect { ':' + it + ":build" }) {
|
||||
archiveName="MineTweaker3-1.7.10-${mineTweakerVersion}.jar"
|
||||
|
||||
from zipTree(project(":ZenScript").jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-API').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC1710-Main').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC1710-Mod-IC2').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC1710-Mod-NEI').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC1710-Mod-MFR').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC1710-Mod-GregTech').jar.archivePath)
|
||||
|
||||
for (p in projects1710) {
|
||||
from zipTree(project(p).jar.archivePath)
|
||||
}
|
||||
}
|
||||
|
||||
task assembleMC172(type: Jar, dependsOn: [\
|
||||
':ZenScript:build',
|
||||
':MineTweaker3-API:build',
|
||||
':MineTweaker3-MC172-Main:build',
|
||||
':MineTweaker3-MC172-Mod-IC2:build',
|
||||
':MineTweaker3-MC172-Mod-NEI:build',
|
||||
':MineTweaker3-MC172-Mod-GregTech:build']) {
|
||||
':MineTweaker3-API:build']
|
||||
+ projects172.collect { ':' + it + ":build" }) {
|
||||
archiveName="MineTweaker3-1.7.2-${mineTweakerVersion}.jar"
|
||||
|
||||
from zipTree(project(":ZenScript").jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-API').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC172-Main').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC172-Mod-IC2').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC172-Mod-NEI').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC172-Mod-GregTech').jar.archivePath)
|
||||
|
||||
for (p in projects172) {
|
||||
from zipTree(project(p).jar.archivePath)
|
||||
}
|
||||
}
|
||||
|
||||
task assembleMC164(type: Jar, dependsOn: [\
|
||||
':ZenScript:build',
|
||||
':MineTweaker3-API:build',
|
||||
':MineTweaker3-MC164-Main:build',
|
||||
':MineTweaker3-MC164-Mod-IC2:build',
|
||||
':MineTweaker3-MC164-Mod-NEI:build',
|
||||
':MineTweaker3-MC164-Mod-GregTech:build',
|
||||
':MineTweaker3-MC164-Mod-MFR:build']) {
|
||||
':MineTweaker3-API:build']
|
||||
+ projects164.collect { ':' + it + ":build" }) {
|
||||
archiveName="MineTweaker3-1.6.4-${mineTweakerVersion}.jar"
|
||||
|
||||
from zipTree(project(":ZenScript").jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-API').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC164-Main').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC164-Mod-IC2').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC164-Mod-NEI').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC164-Mod-GregTech').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC164-Mod-MFR').jar.archivePath)
|
||||
|
||||
for (p in projects164) {
|
||||
from zipTree(project(p).jar.archivePath)
|
||||
}
|
||||
}
|
||||
|
||||
task assembleAll(dependsOn: [
|
||||
@@ -86,13 +67,11 @@ task assembleAll(dependsOn: [
|
||||
}
|
||||
|
||||
task zendoc164(type: Javadoc) {
|
||||
source = files(\
|
||||
source = files([
|
||||
'MineTweaker3-API/src/main/java',
|
||||
'MineTweaker3-MC164-Main/src/main/java',
|
||||
'MineTweaker3-MC164-Mod-IC2/src/main/java',
|
||||
'MineTweaker3-MC164-Mod-NEI/src/main/java',
|
||||
'MineTweaker3-MC164-Mod-GregTech/src/main/java',
|
||||
'MineTweaker3-MC164-Mod-MFR/src/main/java')
|
||||
'MineTweaker3-MC164-Main/src/main/java']
|
||||
+ projects164.collect { it + '/src/main/java' })
|
||||
|
||||
destinationDir = file("build/zendoc164")
|
||||
options.docletpath = [file('buildSrc/build/libs/buildSrc.jar')].asList()
|
||||
options.doclet = 'stanhebben.zenscript.docs.ZenScriptDoclet'
|
||||
@@ -102,34 +81,12 @@ task zendoc164(type: Javadoc) {
|
||||
project(':MineTweaker3-MC164-Main').jar.archivePath
|
||||
]
|
||||
|
||||
for (file in project(':MineTweaker3-MC164-Main').configurations.compile) {
|
||||
classpathList += file
|
||||
}
|
||||
for (file in project(':MineTweaker3-MC164-Mod-IC2').configurations.compile) {
|
||||
classpathList += file
|
||||
}
|
||||
for (file in project(':MineTweaker3-MC164-Mod-GregTech').configurations.compile) {
|
||||
classpathList += file
|
||||
}
|
||||
for (file in project(':MineTweaker3-MC164-Mod-MFR').configurations.compile) {
|
||||
classpathList += file
|
||||
}
|
||||
for (file in project(':MineTweaker3-MC164-Mod-NEI').configurations.compile) {
|
||||
classpathList += file
|
||||
for (p in projects164) {
|
||||
for (file in project(':' + p).configurations.compile) {
|
||||
classpathList += file
|
||||
}
|
||||
}
|
||||
|
||||
options.classpath = classpathList.asList()
|
||||
//options.baseurl = '/doc/mc164'
|
||||
options.addStringOption("baseurl", "/doc/mc164/")
|
||||
}
|
||||
|
||||
task experiment << {
|
||||
def files = [project(":ZenScript").jar.archivePath]
|
||||
for (file in project(':MineTweaker3-MC164-Main').configurations.compile) {
|
||||
files += file
|
||||
}
|
||||
|
||||
for (file in files) {
|
||||
print file.toString() + '\n'
|
||||
}
|
||||
}
|
||||
+44
-3
@@ -1,4 +1,45 @@
|
||||
// #######################
|
||||
// ### Global settings ###
|
||||
// #######################
|
||||
|
||||
ext.mineTweakerVersion="3.0.8"
|
||||
ext.mineTweakerDebug="false"
|
||||
ext.javaToolsJar=new File("C:/Program Files/Java/jdk1.8.0_05/lib/tools.jar")
|
||||
ext.mineTweakerVersion = "3.0.8"
|
||||
ext.mineTweakerDebug = "false"
|
||||
ext.javaToolsJar = new File("C:/Program Files/Java/jdk1.8.0_05/lib/tools.jar")
|
||||
|
||||
// ######################
|
||||
// ### 1.6.4 settings ###
|
||||
// ######################
|
||||
|
||||
ext.forgeVersion164 = "1.6.4-9.11.1.964"
|
||||
ext.projects164 = [
|
||||
'MineTweaker3-MC164-Main',
|
||||
'MineTweaker3-MC164-Mod-IC2',
|
||||
'MineTweaker3-MC164-Mod-NEI',
|
||||
'MineTweaker3-MC164-Mod-MFR',
|
||||
'MineTweaker3-MC164-Mod-GregTech'
|
||||
]
|
||||
|
||||
// ######################
|
||||
// ### 1.7.2 settings ###
|
||||
// ######################
|
||||
|
||||
ext.forgeVersion172 = "1.7.2-10.12.2.1121"
|
||||
ext.projects172 = [
|
||||
'MineTweaker3-MC172-Main',
|
||||
'MineTweaker3-MC172-Mod-IC2',
|
||||
'MineTweaker3-MC172-Mod-NEI',
|
||||
'MineTweaker3-MC172-Mod-GregTech'
|
||||
]
|
||||
|
||||
// #######################
|
||||
// ### 1.7.10 settings ###
|
||||
// #######################
|
||||
|
||||
ext.forgeVersion1710 = "1.7.10-10.13.0.1180"
|
||||
ext.projects1710 = [
|
||||
'MineTweaker3-MC1710-Main',
|
||||
'MineTweaker3-MC1710-Mod-IC2',
|
||||
'MineTweaker3-MC1710-Mod-NEI',
|
||||
'MineTweaker3-MC1710-Mod-MFR',
|
||||
'MineTweaker3-MC1710-Mod-GregTech'
|
||||
]
|
||||
@@ -14,13 +14,16 @@ The MineTweaker 3 source is setup as a multi-project Gradle project:
|
||||
|
||||
- ZenScript is the custom scripting engine
|
||||
- MineTweaker3-API is the shared API for all MineTweaker versions
|
||||
- MineTweaker3-MC17-Main is the main MineTweaker implementation for Minecraft 1.7
|
||||
- MineTweaker3-MC17-Mod-XXX are the mod support projects. They are compiled and obfuscated independently and then assembled later
|
||||
- MineTweaker3-MCXYZ-Main are the main MineTweaker implementations for Minecraft X.Y.Z
|
||||
- MineTweaker3-MCXYZ-Mod-XXX are the mod support projects. They are compiled and obfuscated independently and then assembled later
|
||||
|
||||
### Developing and running MineTweaker from source
|
||||
|
||||
Configuration settings are stored in configuration.gradle .
|
||||
|
||||
In order to run the project, you have to execute the setupDecompWorkspace in the MineTweaker3-MC17-Main project. It will prepare a running environment for you. After that, you can simply run minecraft with the runClient task on MineTweaker3-MC17-Main. It will run MineTweaker. (without its mod support libraries)
|
||||
#### Make sure to configure your tools.jar directory! Nothing will compile without it.
|
||||
|
||||
In order to run the project, you have to execute the setupDecompWorkspace in the MineTweaker3-MCXYZ-Main project. It will prepare a running environment for you. After that, you can simply run minecraft with the runClient task on MineTweaker3-MC17-Main. It will run MineTweaker. (without its mod support libraries)
|
||||
|
||||
Additionally, you will have to copy tools.jar from your JDK to the buildSrc/libs directory (if someone knows how to make a proper reference to it, please let me know).
|
||||
|
||||
|
||||
Reference in new issue
Block a user