-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (95 loc) · 2.72 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
plugins {
id 'me.champeau.jmh' version '0.7.2'
}
allprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
repositories {
mavenCentral()
}
dependencies {
compileOnly 'com.google.code.gson:gson:2.11.0'
compileOnly 'org.jetbrains:annotations:26.0.1'
}
compileJava {
options.encoding = 'UTF-8'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
withJavadocJar()
}
javadoc {
options {
links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
links 'https://javadoc.io/doc/org.jetbrains/annotations/latest/'
links 'https://javadoc.io/doc/com.google.code.gson/gson/latest/'
}
}
publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
}
}
}
}
subprojects {
dependencies {
implementation rootProject
}
}
dependencies {
testImplementation(platform('org.junit:junit-bom:5.11.4'))
testImplementation('org.junit.jupiter:junit-jupiter')
testRuntimeOnly('org.junit.platform:junit-platform-launcher')
testImplementation('com.google.code.gson:gson:2.11.0')
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
jmh {
warmupIterations = 5
iterations = 10
fork = 1
timeUnit = 'ms'
}
def javadocProjects= [
':',
':mapper:mapper-adventure',
':mapper:mapper-bukkit',
':mapper:mapper-cloudburst',
':mapper:mapper-jo-nbt',
':mapper:mapper-minecraft',
':mapper:mapper-nukkit',
':mapper:mapper-vianbt'
]
tasks.register('allJavadoc', Javadoc) {
source javadocProjects.collect { project(it).sourceSets.main.allJava }
classpath = files(javadocProjects.collect { project(it).sourceSets.main.compileClasspath })
options {
links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
links 'https://javadoc.io/doc/org.jetbrains/annotations/latest/'
links 'https://javadoc.io/doc/com.google.code.gson/gson/latest/'
// Adventure mapper
links 'https://javadoc.io/doc/net.kyori/adventure-nbt/latest/'
// jo-nbt mapper
links 'https://javadoc.io/doc/se.llbit/jo-nbt/latest/'
}
destinationDir = file(project.layout.buildDirectory.dir('docs/all-javadoc'))
}