-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
84 lines (71 loc) · 2.16 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
plugins {
id("org.spongepowered.gradle.sponge.dev") version "2.1.1"
id("net.kyori.indra.publishing.sonatype") version "3.1.3"
id("net.kyori.indra.crossdoc") version "3.1.3"
}
defaultTasks("build")
repositories {
maven("https://repo.spongepowered.org/repository/maven-public") {
name = "sponge"
}
}
val specVersion: String by project
tasks {
val version = project.version.toString()
withType(JavaCompile::class).configureEach {
doFirst {
options.compilerArgs.addAll(listOf("--module-path", classpath.asPath, "--module-version", version))
}
}
jar {
manifest {
attributes(mapOf(
"Specification-Title" to "plugin-spi",
"Specification-Vendor" to "SpongePowered",
"Specification-Version" to specVersion,
"Implementation-Title" to project.name,
"Implementation-Version" to project.version
))
}
}
javadoc {
options {
(this as StandardJavadocDocletOptions).apply {
links(
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
"https://checkerframework.org/api/",
"https://maven.apache.org/ref/3.8.6/maven-artifact/apidocs",
"https://jd.spongepowered.org/plugin-meta/0.8.2/"
)
}
}
doFirst {
options.modulePath(classpath.toList())
}
}
}
val projectUrl: String by project
spongeConvention {
repository("plugin-spi") {
ci(true)
publishing(true)
}
mitLicense()
licenseParameters {
this["name"] = project.name
this["organization"] = "SpongePowered"
this["url"] = "https://www.spongepowered.org"
}
}
indra {
javaVersions().target(21)
}
indraCrossdoc {
baseUrl(providers.gradleProperty("javadocPublishRoot"))
}
dependencies {
api("org.spongepowered:plugin-meta:0.8.2")
api("org.apache.maven:maven-artifact:3.8.6")
api("org.apache.logging.log4j:log4j-api:2.17.0")
compileOnlyApi("org.checkerframework:checker-qual:3.26.0")
}