forked from StarLoco/StarLoco-Login
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
45 lines (38 loc) · 1.02 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
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
group 'org.starloco.locos'
// Get version from git tag, fallback to git commit hash
version 'git rev-parse --abbrev-ref HEAD'.execute().getText().trim()
if (version == 'HEAD') {
version 'git rev-parse --short HEAD'.execute().getText().trim()
}
// Make sure we compile in UTF-8 mode
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
sourceSets {
main {
java {
srcDirs 'src'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveFileName = "login.jar"
manifest {
attributes(
'Main-Class': 'org.starloco.locos.kernel.Main'
)
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8