-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathbuild.gradle
128 lines (110 loc) · 3.73 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1+"
}
}
plugins {
id "com.jfrog.bintray" version "1.8.1"
id "org.sonarqube" version "2.6.2"
}
apply plugin: 'net.minecraftforge.gradle.forge'
version = "${mod_version}"
//." + getBuildNumber() + getStable()
group= "${package_group}"
archivesBaseName = "${mod_name}-${mc_version}"
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_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
replace '@VERSION@', project.version
//replaceIn 'LibMisc.java' //I may have missed another file, though I can only find it in here.
//^I believe this part was just copied from Botania
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
repositories {
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "modmaven.k-4u.nl"
}
maven {
name = "thiakil"
url = "http://maven.thiakil.com"
}
maven {
name 'Curseforge Maven' // Baubles + Thaumcraft
url 'http://minecraft.curseforge.com/api/maven/'
}
}
dependencies {
deobfCompile "baubles:Baubles:${baubles_mc_version}:${baubles_version}"
deobfCompile "thaumcraft:Thaumcraft:${mc_version}:${thaumcraft_version}"
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}"
}
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'
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs.add('-Xlint:unchecked')
}
def getBuildNumber() {
if (System.getenv("TRAVIS_BUILD_NUMBER") != null) {
return System.getenv("TRAVIS_BUILD_NUMBER").toString()
}
return ""
}
def getStable() {
if ((System.getenv("DRONE_BRANCH") == null || System.getenv("DRONE_BRANCH").endsWith("-dev"))
&& (System.getenv("TRAVIS_BRANCH") == null || System.getenv("TRAVIS_BRANCH").endsWith("-dev"))) {
return "unstable"
}
return ""
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publish = true
filesSpec {
from 'build/libs'
into '.'
exclude '*sources.jar'
}
pkg {
version {
name = "${project.version}"
released = new Date()
}
repo = 'maven'
name = 'GrimoireOfGaia'
licenses = ['CC0-1.0']
vcsUrl = 'https://github.com/P3pp3rF1y/GrimoireOfGaia.git'
}
}