-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
132 lines (106 loc) · 2.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// Apply Gradle plugins
plugins {
id 'java'
id 'eclipse'
id 'idea'
id 'checkstyle'
id 'net.minecrell.gitpatcher' version '0.9.0'
id 'net.minecrell.licenser' version '0.4.1'
id 'com.github.johnrengelman.shadow' version '5.1.0'
}
defaultTasks 'clean', 'licenseFormat', 'build', 'shadowJar'
// Project information
allprojects {
group = 'blue.lapis.nocturne'
version = '2.0.0-SNAPSHOT'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
patches {
submodule = 'lib/FernFlower'
target = file('FernFlower')
patches = file('patches')
}
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
}
project('FernFlower') {
apply from: rootProject.file('fernflower.gradle')
compileJava.dependsOn rootProject.tasks.applyPatches
}
// Project repositories
repositories {
mavenCentral()
}
// Project dependencies
dependencies {
compile 'org.cadixdev:bombe:0.3.1'
compile project('FernFlower')
compile 'com.google.code.findbugs:jsr305:3.0.2'
testCompile 'junit:junit:4.12'
}
// Read source files using UTF-8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs += [
'-Xlint:unchecked',
]
}
test.testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
processResources {
from 'LICENSE'
}
jar {
classifier = 'base'
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': version,
'Main-Class': 'blue.lapis.nocturne.Main'
)
}
}
shadowJar {
classifier = null
configurations = [project.configurations.compile]
}
// License header formatting
license {
include '**/*.java'
include '**/*.css'
include '**/*.fxml'
}
// check code style
checkstyle {
toolVersion = '6.12.1'
configFile = file('etc/checkstyle.xml')
configProperties = [
'basedir': project.projectDir,
'suppressions': project.file('etc/checkstyle-suppressions.xml'),
'severity': 'warning'
]
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allJava
from tasks.processResources
}
sourceSets {
test {
resources {
srcDir "test"
}
}
}
artifacts {
archives shadowJar
archives sourcesJar
}
wrapper {
gradleVersion = '5.2.1'
}