-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbuild-CI.gradle
77 lines (62 loc) · 2.08 KB
/
build-CI.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
plugins {
id 'java'
id 'maven-publish'
}
group = 'com.github.OSRSB'
allprojects {
repositories {
mavenLocal()
maven { url 'https://repo.runelite.net' }
maven { url 'https://jitpack.io' }
mavenCentral()
}
}
sourceSets {
main {
java {
srcDirs= ["src/main/java"]
}
}
}
jar {
configurations.implementation.setCanBeResolved(true)
from {
configurations.implementation.filter {it.name.startsWith('Dax')}.collect {zipTree(it)}
}
exclude 'META-INF/*.RSA'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
def runeLiteVersion = getRuneLiteVersion()
static def getRuneLiteVersion() {
URL url = new URL("http://repo.runelite.net/net/runelite/client/maven-metadata.xml")
URLConnection urlConnection = url.openConnection()
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(
urlConnection.getInputStream()))
String latestName = null
String inputLine
while ((inputLine = bufferedReader.readLine()) != null) {
inputLine = inputLine.trim()
if (inputLine.contains("<release>")) {
latestName = inputLine.replace("<release>", "").replace("</release>", "")
}
}
bufferedReader.close()
return latestName
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.slf4j:slf4j-simple:1.7.36'
implementation group: 'net.sf.jopt-simple', name:'jopt-simple', version: '5.0.4'
compileOnly group: 'net.runelite', name:'client', version: runeLiteVersion
testImplementation group: 'net.runelite', name:'client', version: runeLiteVersion
testImplementation group: 'net.runelite', name:'jshell', version: runeLiteVersion
implementation 'com.github.OSRSB:OsrsBot:master-SNAPSHOT'
implementation 'com.github.OSRSB:DaxWalkerOSRSBot:master-SNAPSHOT'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}