forked from runelite/runelite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
103 lines (86 loc) · 2.79 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.ajoberstar.grgit:grgit-gradle:3.1.1"
}
}
plugins {
id "com.github.ben-manes.versions" version "0.21.0"
id "com.gradle.build-scan" version "2.3"
}
apply plugin: 'application'
ext {
grgit = org.ajoberstar.grgit.Grgit.open(dir: '.')
localGitCommit = grgit.head().id
localGitCommitShort = grgit.head().getAbbreviatedId(7)
localGitDirty = !grgit.status().clean
}
allprojects {
apply plugin: 'maven'
apply plugin: 'checkstyle'
group = 'net.runelite'
version = '1.5.31-SNAPSHOT'
ext {
rsversion = 181
cacheversion = 165
plusVersion = '2.1.2.0'
gitCommit = localGitCommit
gitCommitShort = localGitCommitShort
gitDirty = localGitDirty
rootPath = rootDir.toString().replace('\\', '/')
injectedClassesPath = rootPath + "/injector-plugin/out/injected-client/"
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
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 = rootProject.file("./checkstyle/checkstyle.xml")
configProperties = [ "suppressionFile" : rootProject.file("./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.5.1'
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"
}