-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redid build scripts. Attempt 1 #build
- Loading branch information
maxanier
committed
Jul 22, 2015
1 parent
d0cef60
commit 9b654e1
Showing
10 changed files
with
260 additions
and
174 deletions.
There are no files selected for viewing
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,139 +1,50 @@ | ||
buildscript { | ||
repositories | ||
{ | ||
mavenCentral() | ||
maven { | ||
name = "forge" | ||
url = "http://files.minecraftforge.net/maven" | ||
} | ||
maven { | ||
name = "sonatype" | ||
url = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
} | ||
{ | ||
mavenCentral() | ||
maven { | ||
name = "forge" | ||
url = "http://files.minecraftforge.net/maven" | ||
} | ||
maven { | ||
name = "sonatype" | ||
url = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
} | ||
dependencies | ||
{ | ||
classpath "net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT" | ||
} | ||
{ | ||
classpath "net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT" | ||
} | ||
} | ||
|
||
apply plugin: "eclipse" | ||
apply plugin: "forge" | ||
apply plugin: "maven" | ||
|
||
loadProperties() | ||
|
||
repositories { | ||
maven { // The repo from which to get waila | ||
name "Mobius Repo" | ||
url "http://mobiusstrip.eu/maven" | ||
} | ||
maven { url 'http://tehnut.info/maven/' } | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compile('mcp.mobius.waila:Waila:'+config.waila_version) { | ||
exclude group: 'mcp.mobius.waila' | ||
} | ||
compile "info.amerifrance.guideapi:Guide-API:"+config.minecraft_version+"-"+config.guide_api_version+":deobf" | ||
compile group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '1.1.0' | ||
} | ||
|
||
|
||
|
||
version=project.mod_version | ||
group = "de.teamlapen.vampirism" | ||
archivesBaseName= "Vampirism" | ||
|
||
//Make sure mcmod info is updated, otherwise the version number seems to be not updated | ||
processResources.outputs.upToDateWhen{ false } | ||
|
||
def loadProperties(){ | ||
ext.configFile = file "build.properties" | ||
ext.configFile = file "build.properties" | ||
|
||
configFile.withReader { | ||
def prop = new Properties() | ||
prop.load(it) | ||
project.ext.config = new ConfigSlurper().parse prop | ||
} | ||
|
||
ext.mod_version="LocalTest" | ||
ext.buildnumber = "DEV" | ||
if(System.getenv().CI){ | ||
project.mod_version = System.getenv("MODVERSION") | ||
project.buildnumber = "SNAPSHOT" | ||
logger.lifecycle "In CI. Version: ${project.mod_version}" | ||
} | ||
else{ | ||
logger.lifecycle "Local build" | ||
} | ||
if(System.getenv().RELEASE){ | ||
project.buildnumber = "RELEASE" | ||
logger.lifecycle "This is a release" | ||
configFile.withReader { | ||
def prop = new Properties() | ||
prop.load(it) | ||
project.ext.config = new ConfigSlurper().parse prop | ||
} | ||
} | ||
|
||
sourceSets | ||
{ | ||
main | ||
{ | ||
java { srcDirs = ["$projectDir/src/main/java"] } resources { srcDirs = ["$projectDir/src/main/resources"] } | ||
} | ||
} | ||
|
||
minecraft { | ||
version = config.minecraft_version + "-" + config.forge_version | ||
|
||
replaceIn "util/REFERENCE.java" | ||
replace "@VERSION@", "${project.mod_version}" | ||
replace "@MVERSION@", "${config.minecraft_version}" | ||
} | ||
|
||
version = "${config.minecraft_version}-${project.mod_version}" | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '1.11' | ||
ext.mod_version="Test" | ||
} | ||
|
||
processResources { | ||
// exclude xcf files, as they are for development only | ||
//exclude '**/*.xcf' | ||
// replace stuff in mcmod.info, nothing else | ||
from(sourceSets.main.resources.srcDirs) { | ||
include '*.info' | ||
// replace version and mcversion | ||
expand 'm_version': project.mod_version, 'mc_version': project.config.minecraft_version | ||
} | ||
// copy everything else, thats not the mcmod.info | ||
from(sourceSets.main.resources.srcDirs) { | ||
exclude '**/*.info' | ||
} | ||
} | ||
|
||
|
||
jar { | ||
manifest { | ||
attributes 'FMLCorePlugin': 'de.teamlapen.vampirism.coremod.VampirismFMLLoadingPlugin', | ||
'FMLCorePluginContainsFMLMod': 'true' | ||
} | ||
} | ||
|
||
task devJar(type: Jar, dependsOn: 'classes') { | ||
from(sourceSets.main.output) { | ||
include '**' | ||
} | ||
|
||
extension = 'jar' | ||
classifier = 'dev' | ||
} | ||
|
||
artifacts { | ||
archives devJar | ||
} | ||
|
||
apply from: 'gradle/versioning.gradle' | ||
apply from: 'gradle/forge.gradle' | ||
apply from: 'gradle/dev.gradle' | ||
apply from: 'gradle/deploy.gradle' | ||
|
||
|
||
|
||
|
||
sourceSets | ||
{ | ||
main | ||
{ | ||
java { srcDirs = ["$projectDir/src/main/java"] } resources { srcDirs = ["$projectDir/src/main/resources"] } | ||
} | ||
} |
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,139 @@ | ||
buildscript { | ||
repositories | ||
{ | ||
mavenCentral() | ||
maven { | ||
name = "forge" | ||
url = "http://files.minecraftforge.net/maven" | ||
} | ||
maven { | ||
name = "sonatype" | ||
url = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
} | ||
dependencies | ||
{ | ||
classpath "net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT" | ||
} | ||
} | ||
|
||
apply plugin: "eclipse" | ||
apply plugin: "forge" | ||
apply plugin: "maven" | ||
|
||
loadProperties() | ||
|
||
repositories { | ||
maven { // The repo from which to get waila | ||
name "Mobius Repo" | ||
url "http://mobiusstrip.eu/maven" | ||
} | ||
maven { url 'http://tehnut.info/maven/' } | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compile('mcp.mobius.waila:Waila:'+config.waila_version) { | ||
exclude group: 'mcp.mobius.waila' | ||
} | ||
compile "info.amerifrance.guideapi:Guide-API:"+config.minecraft_version+"-"+config.guide_api_version+":deobf" | ||
compile group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '1.1.0' | ||
} | ||
|
||
|
||
|
||
version=project.mod_version | ||
group = "de.teamlapen.vampirism" | ||
archivesBaseName= "Vampirism" | ||
|
||
//Make sure mcmod info is updated, otherwise the version number seems to be not updated | ||
processResources.outputs.upToDateWhen{ false } | ||
|
||
def loadProperties(){ | ||
ext.configFile = file "build.properties" | ||
|
||
configFile.withReader { | ||
def prop = new Properties() | ||
prop.load(it) | ||
project.ext.config = new ConfigSlurper().parse prop | ||
} | ||
|
||
ext.mod_version="LocalTest" | ||
ext.buildnumber = "DEV" | ||
if(System.getenv().CI){ | ||
project.mod_version = System.getenv("MODVERSION") | ||
project.buildnumber = "SNAPSHOT" | ||
logger.lifecycle "In CI. Version: ${project.mod_version}" | ||
} | ||
else{ | ||
logger.lifecycle "Local build" | ||
} | ||
if(System.getenv().RELEASE){ | ||
project.buildnumber = "RELEASE" | ||
logger.lifecycle "This is a release" | ||
} | ||
} | ||
|
||
sourceSets | ||
{ | ||
main | ||
{ | ||
java { srcDirs = ["$projectDir/src/main/java"] } resources { srcDirs = ["$projectDir/src/main/resources"] } | ||
} | ||
} | ||
|
||
minecraft { | ||
version = config.minecraft_version + "-" + config.forge_version | ||
|
||
replaceIn "util/REFERENCE.java" | ||
replace "@VERSION@", "${project.mod_version}" | ||
replace "@MVERSION@", "${config.minecraft_version}" | ||
} | ||
|
||
version = "${config.minecraft_version}-${project.mod_version}" | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '1.11' | ||
} | ||
|
||
processResources { | ||
// exclude xcf files, as they are for development only | ||
//exclude '**/*.xcf' | ||
// replace stuff in mcmod.info, nothing else | ||
from(sourceSets.main.resources.srcDirs) { | ||
include '*.info' | ||
// replace version and mcversion | ||
expand 'm_version': project.mod_version, 'mc_version': project.config.minecraft_version | ||
} | ||
// copy everything else, thats not the mcmod.info | ||
from(sourceSets.main.resources.srcDirs) { | ||
exclude '**/*.info' | ||
} | ||
} | ||
|
||
|
||
jar { | ||
manifest { | ||
attributes 'FMLCorePlugin': 'de.teamlapen.vampirism.coremod.VampirismFMLLoadingPlugin', | ||
'FMLCorePluginContainsFMLMod': 'true' | ||
} | ||
} | ||
|
||
task devJar(type: Jar, dependsOn: 'classes') { | ||
from(sourceSets.main.output) { | ||
include '**' | ||
} | ||
|
||
extension = 'jar' | ||
classifier = 'dev' | ||
} | ||
|
||
artifacts { | ||
archives devJar | ||
} | ||
|
||
apply from: 'gradle/deploy.gradle' | ||
|
||
|
||
|
||
|
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,6 +1,8 @@ | ||
#29.07.14 17:00 | ||
minecraft_version = 1.7.10 | ||
forge_version = 10.13.4.1448-1.7.10 | ||
mod_version = LocalTest | ||
guide_api_version = 1.0.1-20 | ||
waila_version = 1.5.11-RC2-NONEI_1.7.10 | ||
|
||
main_version = 0 | ||
major_version = 7 |
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
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,12 @@ | ||
task devJar(type: Jar, dependsOn: 'classes') { | ||
from(sourceSets.main.output) { | ||
include '**' | ||
} | ||
|
||
extension = 'jar' | ||
classifier = 'dev' | ||
} | ||
|
||
artifacts { | ||
archives devJar | ||
} |
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,35 @@ | ||
repositories { | ||
maven { // The repo from which to get waila | ||
name "Mobius Repo" | ||
url "http://mobiusstrip.eu/maven" | ||
} | ||
maven { url 'http://tehnut.info/maven/' } | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compile('mcp.mobius.waila:Waila:'+config.waila_version) | ||
compile "info.amerifrance.guideapi:Guide-API:"+config.minecraft_version+"-"+config.guide_api_version+":deobf" | ||
compile group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '1.1.0' | ||
} | ||
|
||
minecraft { | ||
version = config.minecraft_version + "-" + config.forge_version | ||
|
||
replaceIn "util/REFERENCE.java" | ||
replace "@VERSION@", "${project.mod_version}" | ||
replace "@MVERSION@", "${config.minecraft_version}" | ||
} | ||
|
||
processResources { | ||
// replace stuff in mcmod.info, nothing else | ||
from(sourceSets.main.resources.srcDirs) { | ||
include '*.info' | ||
// replace version and mcversion | ||
expand 'm_version': project.mod_version, 'mc_version': project.config.minecraft_version | ||
} | ||
// copy everything else, thats not the mcmod.info | ||
from(sourceSets.main.resources.srcDirs) { | ||
exclude '**/*.info' | ||
} | ||
} |
Oops, something went wrong.