-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
build.gradle
120 lines (104 loc) · 3.03 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
buildscript {
ext {
indraVersion = '3.1.3'
}
}
plugins {
id 'net.kyori.indra' version "$indraVersion" apply false
id 'net.kyori.indra.publishing.sonatype' version "$indraVersion"
id 'net.kyori.indra.licenser.spotless' version "$indraVersion" apply false
id 'net.kyori.indra.crossdoc' version "$indraVersion" apply false
id 'io.github.gradle-nexus.publish-plugin' version "2.0.0"
}
// Adventure version
ext.adventure = "4.13.1"
group 'net.kyori'
version '4.3.5-SNAPSHOT'
description 'Legacy platform integrations for the adventure UI library'
indraSonatype {
useAlternateSonatypeOSSHost("s01")
}
/**
* Bukkit and its dependencies have metadata that is incorrect and excludes some annotation APIs.
*
* To suppress compiler warnings from being unable to find the appropriate annotations,
* we inject the dependencies here.
*/
@CacheableRule
class BukkitAnnotationsRule implements ComponentMetadataRule {
@Override
void execute(final ComponentMetadataContext componentMetadataContext) {
componentMetadataContext.details.withVariant("compile") {
withDependencies {
add("com.google.errorprone:error_prone_annotations:2.33.0")
add("org.jetbrains:annotations:25.0.0")
}
}
}
}
subprojects {
apply plugin: 'net.kyori.indra'
apply plugin: 'net.kyori.indra.publishing'
apply plugin: 'net.kyori.indra.checkstyle'
apply plugin: 'net.kyori.indra.licenser.spotless'
apply plugin: 'net.kyori.indra.crossdoc'
dependencies {
components {
withModule("com.destroystokyo.paper:paper-api", BukkitAnnotationsRule)
}
annotationProcessor 'ca.stellardrift:contract-validator:1.0.1'
checkstyle 'ca.stellardrift:stylecheck:0.2.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.11.2'
}
tasks.withType(Javadoc).configureEach {
options {
links(
"https://jd.advntr.dev/api/$adventure",
"https://jd.advntr.dev/text-serializer-legacy/$adventure",
"https://jd.advntr.dev/text-serializer-gson/$adventure",
"https://jd.advntr.dev/nbt/$adventure"
)
}
}
indra {
javaVersions {
testWith(8, 11, 17)
}
github("KyoriPowered", "adventure-platform") {
ci(true)
}
mitLicense()
signWithKeyFromPrefixedProperties 'kyori'
configurePublications {
pom {
developers {
developer {
id = 'kashike'
timezone = 'America/Vancouver'
}
developer {
id = 'lucko'
name = 'Luck'
url = 'https://lucko.me'
email = 'git@lucko.me'
}
developer {
id = 'zml'
name = 'zml'
timezone = 'America/Vancouver'
}
developer {
id = 'Electroid'
}
}
}
}
}
indraCrossdoc {
baseUrl().set(providers.gradleProperty('javadocPublishRoot'))
nameBasedDocumentationUrlProvider {
projectNamePrefix = "adventure-platform-"
}
}
}