-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
86 lines (67 loc) · 1.77 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
plugins {
id "com.gradleup.shadow" apply false
id "com.diffplug.spotless" apply false
}
allprojects {
apply plugin: "java-library"
apply plugin: "maven-publish"
apply plugin: "checkstyle"
apply plugin: "com.diffplug.spotless"
apply plugin: "com.gradleup.shadow"
checkstyle {
configFile = rootProject.file("checkstyle.xml")
toolVersion = project.checkstyle_tool_version
}
spotless {
lineEndings = com.diffplug.spotless.LineEnding.UNIX
java {
removeUnusedImports()
importOrder("java", "javax", "", "net.minecraft", "com.github.nebelnidas")
indentWithTabs()
trimTrailingWhitespace()
}
}
group "com.github.nebelnidas.kfdl"
version = rootProject.version
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
java {
withSourcesJar()
withJavadocJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
}
repositories {
mavenCentral()
}
dependencies {
compileOnly "org.jetbrains:annotations:${project.jetbrains_annotations_version}"
testImplementation "org.junit.jupiter:junit-jupiter:${junit_jupiter_version}"
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
testCompileOnly "org.jetbrains:annotations:${project.jetbrains_annotations_version}"
}
test {
useJUnitPlatform()
}
javadoc {
failOnError = false
options.addBooleanOption('html5', true)
// disable 'missing' warnings
options.addStringOption('Xdoclint:all,-missing', '-quiet')
}
assemble.dependsOn javadocJar
publishing {
publications {
"$project.name"(MavenPublication) {
from components.java
}
}
}
}