-
-
Notifications
You must be signed in to change notification settings - Fork 506
/
build.gradle
60 lines (50 loc) · 1.49 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
plugins {
id 'com.diffplug.spotless' version '5.12.5' apply false
}
subprojects {
apply plugin: 'java'
apply plugin: 'pmd'
apply plugin: "com.diffplug.spotless"
apply plugin: 'maven-publish'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.withSourcesJar()
archivesBaseName = "${mod_name}"
repositories {
mavenCentral()
maven {
name = 'Sponge / Mixin'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release = 17
}
tasks.withType(GenerateModuleMetadata).configureEach {
it.enabled = false
}
pmd {
toolVersion '6.35.0'
incrementalAnalysis.set(true)
ruleSetFiles = rootProject.files("spotless/pmd-ruleset.xml")
}
jar {
from "LICENSE"
exclude "**/*.bat"
exclude "**/*.psd"
exclude "**/*.ase"
exclude "**/*.exe"
exclude "**/unused"
exclude ".cache"
}
spotless {
enforceCheck = false // workaround around jenkins having wrong line endings in some files
// we explicitly check in github actions builds
java {
indentWithTabs()
eclipse().configFile rootProject.file('spotless/eclipseformat.xml')
removeUnusedImports()
importOrderFile rootProject.file('spotless/eclipse.importorder')
}
}
}