This repository has been archived by the owner on Nov 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
118 lines (96 loc) · 3.41 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
buildscript {
repositories {
jcenter()
}
ext.kotlin_version = '1.2.51'
dependencies {
//Used to build a shadow jar (contains all its dependencies, putting aside the jre)
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'application'
apply plugin: 'kotlin'
apply plugin: 'eclipse'
apply plugin: 'idea'
mainClassName = 'com.msc.serverbrowser.Client'
sourceSets {
demo.kotlin.srcDirs += 'src/demo/kotlin'
demo.compileClasspath += main.output
demo.compileClasspath += main.compileClasspath
}
compileKotlin {
kotlinOptions {
jvmTarget = '1.8'
}
//Overwriting the launchers version number, to assure its correct in the deployed build
Properties props = new Properties()
props.setProperty('version', projectVersion)
File propsFile = new File('src/main/resources/com/msc/serverbrowser/version.properties')
props.store(propsFile.newWriter(), "Do not change manually, only change gradle.properties")
}
compileTestKotlin {
kotlinOptions {
jvmTarget = '1.8'
}
}
repositories {
jcenter()
mavenCentral()
maven {
url 'https://jitpack.io'
}
}
dependencies {
//Used for registering global keyboard listeners in order to enable custom keybindings
demoCompile 'com.1stleg:jnativehook:2.1.+'
//Used for sotrage of settings and so on (user data)
compile 'org.xerial:sqlite-jdbc:3.19.+'
//Used to deserialize the replies i get from sa-mp servers api
compile 'com.eclipsesource.minimal-json:minimal-json:0.9.+'
//Used to displays os independent tray notifications
compile 'com.github.Bios-Marcel:TrayNotification:1.3.1.1'
//Used to update the application by using the latest releases from github
compile 'org.kohsuke:github-api:1.89'
//Used to guess the charsets, that the sa-mp servers are using in order display names correctly
compile 'com.github.albfernandez:juniversalchardet:2.0.+'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
//Dependencies for testing
testCompile("org.junit.jupiter:junit-jupiter-api:5.2.0")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.2.0")
}
test {
useJUnitPlatform()
}
/*
* Provide a fixed version of gradle for people building this project.
*/
wrapper {
gradleVersion = gradleWrapperVersion
}
apply plugin: 'com.github.johnrengelman.shadow'
shadowJar {
dependsOn "test"
baseName = 'launcher'
//Those are `null` since we only want baseName.jar as our filename.
version = null
classifier = null
/*
* WARNING! Changes to excludes/includes only seem to take effect after a "clean" with gradle.
* I am not sure where the bug lies, but this should not happen with gradle...
*/
//Excluding binary stuff for unsupported platforms
exclude 'org/sqlite/native/Linux/android-arm/**'
exclude 'org/sqlite/native/Linux/arm/**'
exclude 'org/sqlite/native/Linux/armv6/**'
exclude 'org/sqlite/native/Linux/armv7/**'
exclude 'org/sqlite/native/Linux/ppc64/**'
exclude 'org/sqlite/native/Linux/x86/**'
exclude 'org/sqlite/native/FreeBSD/**'
//If you are still using 32-bit ... fuck you ;)
exclude 'org/sqlite/native/Windows/x86/**'
//Trash
exclude 'META-INF/maven/**'
//Merges all service file under "META-INF/services" to one
mergeServiceFiles()
}