forked from P3pp3rF1y/AncientWarfare2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
146 lines (130 loc) · 4.26 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
repositories {
jcenter()
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: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"
}
// We apply the 'forge' plugin, so ForgeGradle can do it's stuff.
apply plugin: 'net.minecraftforge.gradle.forge'
repositories {
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
}
maven {
name = "ChickenBones Maven"
url = "http://chickenbones.net/maven/"
}
maven {
name "LatvianModder Ivy"
url = "https://maven.latmod.com/"
}
maven {
url "http://dvs1.progwml6.com/files/maven"
}
maven {
url "http://tehnut.info/maven"
}
ivy {
name "infinitylib"
ivyPattern 'http://www.google.com/FAKE_URL/ugly_workaround_because_curseforge_403.txt'
artifactPattern "http://media.forgecdn.net/files/${infinitylib_cf}/[module]-[revision].[ext]"
}
}
minecraft{
version = minecraft_version + "-" + forge_version
mappings = mcp_mappings
runDir = "run"
replaceIn "automation/AncientWarfareAutomation.java"
replaceIn "core/AncientWarfareCore.java"
replaceIn "npc/AncientWarfareNPC.java"
replaceIn "structure/AncientWarfareStructures.java"
replaceIn "vehicle/AncientWarfareVehicles.java"
replace "@VERSION@", "${project.minecraft.version}-${project.major}.${project.minor}.${project.patch}." + getBuildNumber() + getStable()
}
version = minecraft.version + "-" + project.major +"."+ project.minor +"."+ project.patch +"."+ getBuildNumber() + getStable()
group = "shadowmage"
archivesBaseName = "ancientwarfare"
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
deobfCompile "cofh:RedstoneFlux:${rf_version}:universal"
deobfCompile "mezz.jei:jei_${minecraft_version}:${jei_version}"
deobfCompile "codechicken:CodeChickenLib:${ccl_version}:deobf"
deobfCompile "com.feed_the_beast.mods:FTBLib:${ftblib_version}"
deobfCompile name: 'infinitylib', version: infinitylib_version, ext: 'jar'
deobfCompile "com.infinityraider.agricraft:AgriCraft:${agricraft_version}"
}
processResources{
// 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'
}
rename '(.+_at.cfg)', 'META-INF/$1'
}
jar {
manifest {
attributes 'FMLAT': 'ancientwarfare_at.cfg'
}
}
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 = 'AncientWarfare2'
licenses = ['GPL-3.0']
vcsUrl = 'https://github.com/P3pp3rF1y/AncientWarfare2.git'
}
}
sonarqube {
properties {
property "sonar.projectName", "Ancient Warfare 2"
property "sonar.projectKey", "ancientwarfare"
}
}