-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
66 lines (55 loc) · 2.17 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
import java.nio.charset.StandardCharsets
import java.text.SimpleDateFormat
if (!System.properties['java.version'].startsWith('1.8')) {
throw new RuntimeException('Incompatible JRE version: ' + System.properties['java.version'] + '. Use JRE 1.8 instead.')
}
allprojects { project ->
apply plugin: 'idea'
group 'io.github.gcdd1993'
version rootVersion
}
subprojects { project ->
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile) {
options.encoding = StandardCharsets.UTF_8
}
jar {
enabled = true
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Built-By': System.properties['user.name'],
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()),
'Created-By': "Gradle ${gradle.gradleVersion}",
'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Build-OS': "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}"
)
}
}
repositories {
mavenLocal()
maven {
url = uri('http://maven.aliyun.com/nexus/content/groups/public/')
}
maven {
url = uri('http://repo.maven.apache.org/maven2')
}
mavenCentral()
}
dependencies {
compileOnly("org.projectlombok:lombok:$lombokVersion")
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
testImplementation(platform("org.junit:junit-bom:$junitVersion"))
testRuntimeOnly("org.junit.platform:junit-platform-launcher") {
because("Only needed to run tests in a version of IntelliJ IDEA that bundles older versions")
}
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
test {
useJUnitPlatform()
}
}