forked from NyaaCat/LanguageUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (88 loc) · 2.55 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
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
group = 'cat.nyaa'
archivesBaseName = 'LangUtils'
// Version strings used for CI
// Note the spaces before and after the equals sign
ext.majorVersion = 2
ext.minorVersion = 1
ext.minecraftVersion = "1.13.1"
sourceCompatibility = '1.8'
compileJava {
options.compilerArgs += ["-Xlint:deprecation", "-Xlint:unchecked"]
options.encoding = 'UTF-8'
}
//noinspection GroovyAssignabilityCheck
processResources {
from(sourceSets.main.resources.srcDirs) {
exclude 'plugin.yml'
}
from(sourceSets.main.resources.srcDirs) {
include 'plugin.yml'
expand 'version': project.version
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
maven(MavenPublication) {
artifactId 'LangUtils'
version "$majorVersion.$minorVersion-SNAPSHOT"
from components.java
artifact sourcesJar
artifact javadocJar
}
}
repositories {
maven {
url "$buildDir/repo"
}
}
}
build.dependsOn sourcesJar, javadocJar
repositories {
mavenCentral()
mavenLocal()
maven {
url 'https://hub.spigotmc.org/nexus/content/groups/public/'
}
maven {
url 'https://oss.sonatype.org/content/groups/public/'
}
}
dependencies {
//Bukkit API and libraries
compileOnly "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT"
}
javadoc {
(options as StandardJavadocDocletOptions).with {
links 'https://docs.oracle.com/javase/8/docs/api/'
links 'https://hub.spigotmc.org/javadocs/spigot/'
links 'https://google.github.io/guava/releases/21.0/api/docs/'
links 'https://ci.md-5.net/job/BungeeCord/ws/chat/target/apidocs/'
locale 'en_US'
encoding 'UTF-8'
docEncoding 'UTF-8'
addBooleanOption('keywords', true)
def currentJavaVersion = JavaVersion.current()
if (currentJavaVersion > JavaVersion.VERSION_1_9) {
options.addBooleanOption('html5', true)
}
windowTitle = "LangUtils Javadoc"
String fullVersion = System.getenv("FULL_VERSION_STRING")
if (fullVersion != null){
docTitle = "<b>LangUtils</b> " + System.getenv("FULL_VERSION_STRING")
} else {
docTitle = "<b>LangUtils</b>"
}
}
}