forked from darkhelmet-gaming/Prism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (103 loc) · 3.33 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()
maven {
name = "gradle"
url = "https://plugins.gradle.org/m2"
}
}
dependencies {
classpath("com.github.jengelman.gradle.plugins:shadow:4.0.3")
classpath("gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0")
}
}
apply plugin: "com.github.hierynomus.license"
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "java"
apply plugin: "maven"
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = "com.helion3"
archivesBaseName = "prism"
version = "3.1.0"
license {
exclude("**/*.info")
exclude("assets/**")
header = file("HEADER.txt")
ignoreFailures = false
strictCheck = true
mapping {
java = "SLASHSTAR_STYLE"
}
}
configurations {
provided {
compile.extendsFrom(provided)
}
compileJava.options.compilerArgs += ["-Xlint:all", "-Xlint:-path", "-Xlint:-processing"]
compileJava.options.deprecation = true
compileJava.options.encoding = "utf8"
jar.dependsOn("shadowJar")
licenseMain.ext.name = project.archivesBaseName
licenseMain.ext.organization = "Helion3"
licenseMain.ext.url = "http://helion3.com/"
licenseMain.ext.year = "2015"
licenseTest.ext.name = licenseMain.ext.name
licenseTest.ext.organization = licenseMain.ext.organization
licenseTest.ext.url = licenseMain.ext.url
licenseTest.ext.year = licenseMain.ext.year
project.ext.buildNumber = project.hasProperty("buildNumber") ? buildNumber : "0"
project.ext.ciSystem = project.hasProperty("ciSystem") ? ciSystem : "unknown"
project.ext.commit = project.hasProperty("commit") ? commit : "unknown"
}
repositories {
jcenter()
maven {
name = "spongepowered"
url = "https://repo.spongepowered.org/repository/maven-public/"
}
}
dependencies {
shadow("mysql:mysql-connector-java:8.0.19")
shadow("org.mariadb.jdbc:mariadb-java-client:2.5.4")
provided("com.zaxxer:HikariCP:3.4.2")
testCompile("org.junit.jupiter:junit-jupiter-engine:5.5.1")
shadow("org.mongodb:mongo-java-driver:3.10.2")
testCompile("org.mongodb:mongo-java-driver:3.10.2")
annotationProcessor("org.spongepowered:spongeapi:7.1.0")
provided("org.spongepowered:spongeapi:7.3.0")
}
shadowJar {
configurations = [project.configurations.shadow]
relocate("com.mongodb", "com.helion3.prism.lib.mongodb")
relocate("org.bson", "com.helion3.prism.lib.bson")
}
jar {
manifest {
attributes(
"Built-By": System.properties["user.name"],
"Created-By": System.properties["java.vm.version"] + " (" + System.properties["java.vm.vendor"] + ")",
"Implementation-Title": project.archivesBaseName,
"Implementation-Version": version + "+" + ciSystem + "-b" + buildNumber + ".git-" + commit,
"Implementation-Vendor": licenseMain.url
)
}
from {
(configurations.compile - configurations.provided).collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
processResources {
from("LICENSE.txt")
rename("LICENSE.txt", "LICENSE-" + archivesBaseName + ".txt")
}
test {
testLogging {
exceptionFormat = "full"
showStandardStreams = true
}
useJUnitPlatform()
}