-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
102 lines (82 loc) · 1.82 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
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
plugins {
id("com.gradle.plugin-publish").version("1.2.0")
id("maven-publish")
id("groovy")
}
group = "com.mmodding"
version = "0.0.14-alpha"
val javaVersion = 17
repositories {
mavenCentral()
maven {
name = "FabricMC"
url = uri("https://maven.fabricmc.net/")
}
maven {
name = "QuiltMC"
url = uri("https://maven.quiltmc.org/repository/release/")
}
}
sourceSets {
test {
groovy.srcDirs("src/test/groovy")
}
}
dependencies {
compileOnly(libs.jetbrains.annotations)
compileOnly(libs.loom.fabric)
implementation(libs.quilt.parsers.json)
// Use JUnit Jupiter for testing.
testImplementation(libs.spock)
testRuntimeOnly(libs.junit)
}
gradlePlugin {
website = "https://mmodding.com"
vcsUrl = "https://github.com/MModding/mmodding-gradle"
// Define the plugin.
plugins {
register("mmodding_gradle") {
id = "com.mmodding.gradle"
displayName = "MModding Gradle"
description = "List of Gradle Tools to Help in Minecraft Mod Development"
tags = listOf("minecraft", "fabric-loom", "quilt-loom")
implementationClass = "com.mmodding.gradle.MModdingGradlePlugin"
}
}
testSourceSets(sourceSets.test.get())
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
withSourcesJar()
withJavadocJar()
testResultsDir.set(layout.buildDirectory.dir("junit-xml"))
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.isDeprecation = true
options.release.set(javaVersion)
}
tasks.withType<Javadoc>().configureEach {
options {
this as StandardJavadocDocletOptions
addStringOption("Xdoclint:all,-missing", "-quiet")
}
}
tasks.jar {
from("LICENSE.md") {
rename { "${it}_${base.archivesName.get()}" }
}
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
tasks.check {
dependsOn(tasks.test)
}
publishing {
repositories {
mavenLocal()
}
}