-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
60 lines (50 loc) · 1.3 KB
/
build.gradle.kts
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 {
idea
eclipse
checkstyle
`java-library`
`maven-publish`
id("com.diffplug.spotless")
}
allprojects {
apply(plugin = "checkstyle")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "com.diffplug.spotless")
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
repositories {
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
java {
withSourcesJar()
}
dependencies {
implementation("org.jetbrains:annotations:23.0.0")
}
tasks.withType<ProcessResources>().configureEach {
inputs.property("version", project.version)
filesMatching(listOf("fabric.mod.json", "plugin.yml")) {
expand("version" to project.version)
}
}
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER")).yearSeparator("-")
}
}
checkstyle {
toolVersion = "10.6.0"
configFile = rootProject.file("checkstyle.xml")
}
}
tasks {
register("fatJar", Jar::class.java) {
dependsOn(":tensai-bukkit:bukkitFatJar")
dependsOn(":tensai-fabric:fabricFatJar")
}
}