forked from runelite/runelite
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.gradle
196 lines (168 loc) · 4.99 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
import org.ajoberstar.grgit.Grgit
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.ajoberstar.grgit:grgit-gradle:3.1.1"
}
}
plugins {
id 'com.adarshr.test-logger' version '1.7.0' apply false
id "com.github.ben-manes.versions" version "0.22.0"
id "com.gradle.build-scan" version "2.4"
id 'se.patrikerdes.use-latest-versions' version '0.2.8'
}
apply plugin: 'application'
ext {
grgit = Grgit.open(dir: "${rootProject.projectDir}")
localGitCommit = grgit.head().id
localGitCommitShort = grgit.head().getAbbreviatedId(7)
localGitDirty = !grgit.status().clean
// sets the minimum launcher version that is output for the bootstrapper
launcherVersion = '2.0.3'
// Dependencies versions
annotations = '17.0.0'
antlr = '4.7.2'
apacheCommonsCompress = '1.19'
apacheCommonsCsv = '1.7'
apacheCommonsText = '1.8'
asm = '7.2'
commonsCli = '1.4'
discord = '1.1'
fernflower = '07082019'
findbugs = '3.0.2'
gson = '2.8.6'
guava = '28.1-jre'
guice = '4.2.2'
h2 = '1.4.199'
hamcrest = '2.1'
httpcore = '4.4.12'
httpmime = '4.5.10'
javassist = '3.26.0-GA'
javax = '1.3.2'
javaxInject = '1'
jbsdiff = '1.0'
jclCore = '2.8'
jedis = '3.1.0'
jfoenix = '9.0.9'
jna = '5.4.0'
jogamp = '2.3.2'
jopt = '5.0.4'
jooq = '3.12.1'
junit = '4.12'
jupiter = '5.5.2'
logback = '1.2.3'
lombok = '1.18.10'
mapstruct = '1.3.1.Final'
mariadbJdbc = '2.5.0'
mavenPluginAnnotations = '3.6.0'
mavenPluginApi = '3.6.2'
minio = '6.0.11'
mockito = '3.1.0'
mongodbDriverSync = '3.11.0'
mysqlConnectorJava = '8.0.17'
netty = '4.1.42.Final'
okhttp3 = '4.2.1'
orangeExtensions = '1.0'
petitparser = '2.2.0'
plexus = '3.2.1'
rxjava = '2.2.13'
rxrelay = '2.1.1'
scribejava = '6.9.0'
sisu = '0.3.3'
slf4j = '1.7.28'
springJdbc = '5.2.0.RELEASE'
springboot = '2.1.9.RELEASE'
sql2o = '1.6.0'
substance = '8.0.02'
trident = '1.5.00'
}
allprojects {
apply plugin: 'maven'
if (this.name != 'rs-client') apply plugin: 'checkstyle'
group = 'us.runelitepl'
version = '1.5.35-SNAPSHOT'
ext {
rsversion = 184
cacheversion = 165
plusVersion = '2.1.6.0'
gitCommit = localGitCommit
gitCommitShort = localGitCommitShort
gitDirty = localGitDirty
rootPath = rootDir.toString().replace('\\', '/')
injectedClassesPath = rootPath + "/injector-plugin/out/injected-client/"
}
}
subprojects {
apply plugin: 'com.adarshr.test-logger'
apply plugin: 'java-library'
apply plugin: 'maven'
apply plugin: 'fernflower'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(GroovyCompile).configureEach {
options.incremental = true
}
repositories {
mavenLocal()
maven { url "http://repo1.maven.org/maven2" }
maven { url "http://repo.runelite.net" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://raw.githubusercontent.com/runelite-extended/maven-repo/master" }
if (System.getenv("NEXUS-URL") != null) {
maven { url System.getenv("NEXUS-URL") }
}
}
checkstyle {
toolVersion = '6.4.1'
sourceSets = [sourceSets.main]
configFile = file("${rootDir}/checkstyle/checkstyle.xml")
configProperties = [ "suppressionFile" : file("${rootDir}/checkstyle/suppressions.xml")]
showViolations = true
ignoreFailures = false
maxWarnings = 0
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: System.getenv("NEXUS_URL")) {
authentication(userName: System.getenv("NEXUS_USER"), password: System.getenv("NEXUS_PASSWORD"))
}
}
}
}
}
wrapper {
gradleVersion = '5.6.2'
doLast {
def optsEnvVar = "DEFAULT_JVM_OPTS"
scriptFile.write scriptFile.text.replace("$optsEnvVar='\"-Xmx64m\" \"-Xms64m\"'", "$optsEnvVar='\"-Xmx4g\" \"-Xms2g\" \"-Dfile.encoding=UTF-8\"'")
batchScript.write batchScript.text.replace("set $optsEnvVar=\"-Xmx64m\" \"-Xms64m\"", "set $optsEnvVar=\"-Xmx4g\" \"-Xms2g\" \"-Dfile.encoding=UTF-8\"")
}
}
run {
classpath = childProjects.client.sourceSets.main.runtimeClasspath
mainClassName = "net.runelite.client.RuneLite"
}
def isNonStable = { String version ->
def unstableKeyword = ['ALPHA', 'BETA', 'RC'].any { it -> version.toUpperCase().contains(it) }
return unstableKeyword
}
dependencyUpdates {
checkForGradleUpdate = false
resolutionStrategy {
componentSelection {
all {
if (isNonStable(candidate.version)) {
reject()
}
}
}
}
}