forked from CyclopsMC/IntegratedDynamics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (61 loc) · 1.88 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
}
}
plugins {
// For people who want stable
//id "net.minecraftforge.gradle.forge" version "2.0.2"
id 'com.matthewprenger.cursegradle' version '1.0.9'
}
// For those who want the bleeding edge
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'com.github.johnrengelman.shadow'
loadProperties()
version = config.mod_version
group = "org.cyclops.integrateddynamics"
archivesBaseName = "IntegratedDynamics"
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations {
shadow
}
def loadProperties() {
// Config file with custom properties
ext.configFile = file "build.properties"
configFile.withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
// grab buildNumber
ext.buildnumber = "DEV" // this will be referenced as simply project.buildnumber from now on.
if (System.getenv().BUILD_NUMBER)
project.buildnumber = System.getenv().BUILD_NUMBER
if (System.getenv().TRAVIS_BUILD_NUMBER)
project.buildnumber = System.getenv().TRAVIS_BUILD_NUMBER
if (System.getenv().CI) {
//project.buildnumber += "-DEV"
}
if (System.getenv().RELEASE || System.getenv().TRAVIS_TAG)
project.buildnumber = "RELEASE"
logger.lifecycle "BUILDING VERSION: " + project.buildnumber
}
apply from: 'gradle/forge.gradle'
apply from: 'gradle/dev.gradle'
apply from: 'gradle/deploy.gradle'
// Mark API directory as source directory in IDEA.
idea {
module {
sourceDirs += file('src/api/java')
}
}