/
build.gradle.kts
130 lines (109 loc) · 3.77 KB
/
build.gradle.kts
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
/*
version = '3.0.0'
*/
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath("com.github.ben-manes:gradle-versions-plugin:0.28.0")
}
}
plugins {
id("com.github.johnrengelman.shadow") version "6.0.0"
java
checkstyle
}
group = "com.openosrs"
version = "3.0.0"
description = "OpenOSRS Launcher"
repositories {
mavenLocal()
maven {
url = uri("https://repo1.maven.org/maven2")
}
maven {
url = uri("https://raw.githubusercontent.com/open-osrs/maven-repo/master")
}
}
dependencies {
annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.20")
compileOnly(group = "javax.annotation", name = "javax.annotation-api", version = "1.3.2")
compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.20")
implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.25")
implementation(group = "ch.qos.logback", name = "logback-classic", version = "1.2.9")
implementation(group = "net.sf.jopt-simple", name = "jopt-simple", version = "5.0.1")
implementation(group = "com.google.code.gson", name = "gson", version = "2.8.5")
implementation(group = "com.google.code.findbugs", name = "jsr305", version = "3.0.2")
implementation(group = "com.google.guava", name = "guava", version = "23.2-jre") {
exclude(group = "com.google.code.findbugs", module = "jsr305")
exclude(group = "com.google.errorprone", module = "error_prone_annotations")
exclude(group = "com.google.j2objc", module = "j2objc-annotations")
exclude(group = "org.codehaus.mojo", module = "animal-sniffer-annotations")
}
implementation(group = "com.vdurmont", name = "semver4j", version = "3.1.0")
testImplementation(group = "junit", name = "junit", version = "4.12")
}
configure<CheckstyleExtension> {
maxWarnings = 0
toolVersion = "8.25"
isShowViolations = true
isIgnoreFailures = false
}
tasks {
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
withType<JavaCompile> {
options.encoding = "UTF-8"
}
build {
finalizedBy("shadowJar")
}
processResources {
val tokens = mapOf(
"basedir" to project.projectDir.path,
"finalName" to "OpenOSRS",
"artifact" to "launcher",
"project.version" to project.version,
"project.group" to project.group,
"description" to "OpenOSRS launcher"
)
doLast {
copy {
from("${rootDir}/packr") {
include("Info.plist")
}
from("${rootDir}/innosetup") {
include("openosrs.iss")
include("openosrs32.iss")
}
from("${rootDir}/appimage") {
include("openosrs.desktop")
}
into("${buildDir}/filtered-resources/")
filter(ReplaceTokens::class, "tokens" to tokens)
filteringCharset = "UTF-8"
}
copy {
from("src/main/resources") {
include("launcher.properties")
}
into("${buildDir}/resources/main/net/runelite/launcher")
filter(ReplaceTokens::class, "tokens" to tokens)
filteringCharset = "UTF-8"
}
}
}
jar {
manifest {
attributes(mutableMapOf("Main-Class" to "net.runelite.launcher.Launcher"))
}
}
shadowJar {
archiveName = "OpenOSRS-shaded.jar"
exclude("net/runelite/injector/**")
}
}