forked from P3pp3rF1y/Reliquary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·131 lines (113 loc) · 4.04 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
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.4"
}
// We apply the 'forge' plugin, so ForgeGradle can do it's stuff.
apply plugin: 'net.minecraftforge.gradle.forge'
repositories {
maven { url "http://dvs1.progwml6.com/files/maven" }
maven { url "http://tehnut.info/maven" }
maven { url "https://dl.bintray.com/way2muchnoise/dev" }
maven { url "http://maven.thiakil.com" }
ivy {
name "Botania"
ivyPattern 'http://www.google.com/FAKE_URL/ugly_workaround_because_curseforge_403.txt'
artifactPattern "http://media.forgecdn.net/files/${botania_cf}/[module] r[revision].[ext]"
}
}
group = 'xreliquary'
version = "${minecraft_version}-${mod_version}.${getBuildNumber()}${getStable()}"
archivesBaseName = 'Reliquary'
dependencies {
deobfCompile "mezz.jei:jei_${minecraft_version}:${jei_version}"
//deobfCompile "slimeknights.mantle:Mantle:${mantle_version}"
//deobfCompile "slimeknights:TConstruct:${tconstruct_version}"
//deobfCompile "info.amerifrance.guideapi:Guide-API:${guideapi_version}"
deobfCompile "mcp.mobius.waila:Hwyla:${hwyla_version}"
deobfCompile "jeresources:JustEnoughResources-${minecraft_version}:${jer_version}"
deobfCompile "com.azanor.baubles:Baubles:${baubles_version}"
deobfCompile name: 'Botania', version: botania_version, ext: 'jar'
deobfCompile "slimeknights.mantle:Mantle:${mantle_version}"
deobfCompile "slimeknights:TConstruct:${tconstruct_version}"
//compile name:'Thaumcraft', version: thaumcraft_version, ext: 'jar'
testCompile 'org.testng:testng:6.9.10'
testCompile "org.mockito:mockito-core:1.+"
testCompile "org.powermock:powermock-mockito-release-full:1.6.2"
}
test {
useTestNG()
}
minecraft {
version = minecraft_version + "-" + forge_version
mappings = mcp_mappings
runDir = "run"
replaceIn "reference/Reference.java"
replace "@MOD_VERSION@", "${project.version}"
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "project_version", project.version
inputs.property "minecraft_version", minecraft_version
// Replace stuff in mcmod.info and in .lang files, nothing else.
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// Replace version and mcversion.
expand 'project_version': project.version, 'minecraft_version': minecraft_version
}
// Copy everything else that wasn't replaced.
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
def getBuildNumber() {
if (System.getenv("DRONE_BUILD_NUMBER") != null) {
return "${System.getenv("DRONE_BUILD_NUMBER")}"
}
if (System.getenv("TRAVIS_BUILD_NUMBER") != null) {
return (Integer.parseInt(System.getenv("TRAVIS_BUILD_NUMBER")) + 500).toString() //hack to continue with build numbers on Travis
}
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 = 'Reliquary'
licenses = ['GPL-3.0']
vcsUrl = 'https://github.com/P3pp3rF1y/Reliquary.git'
}
}