This repository has been archived by the owner on Jul 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
78 lines (62 loc) · 1.75 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
import java.util.concurrent.TimeUnit
plugins {
id "com.github.johnrengelman.shadow" version "5.2.0"
}
apply plugin: 'java-library'
apply plugin: 'com.github.johnrengelman.shadow'
apply from: 'gradle/vars.gradle'
group 'org.comroid'
version '0.4.0-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(Javadoc) {
source = sourceSets.main.java
options.encoding = 'UTF-8'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
try {
archiveClassifier.set 'sources'
} catch (MissingPropertyException ignored) {
classifier = "sources"
}
}
task javadocJar(type: Jar) {
dependsOn 'javadoc'
from javadoc.destinationDir
try {
archiveClassifier.set 'javadoc'
} catch (MissingPropertyException ignored) {
classifier = "javadoc"
}
}
compileJava.options.encoding = 'UTF-8'
processResources {
from(sourceSets.main.resources) {
expand project.properties
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}
task copyPluginForTesting(type: Copy, dependsOn: ['shadowJar', 'publishToMavenLocal']) {
from shadowJar.outputs.files.singleFile
into file("$testServerDir/plugins/")
doFirst {
System.out.println("Output Directory: " + outputs.files.singleFile)
}
}
repositories {
maven { url 'https://maven.comroid.org' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
mavenLocal()
mavenCentral()
}
dependencies {
compileOnly 'org.jetbrains:annotations:+'
compileOnly "org.spigotmc:spigot-api:$mcVersion-$spigotRC-SNAPSHOT"
if (isAutoDeploy) {
api 'org.comroid:uniform:+'
} else {
api project(':guardian:uniform')
}
}
apply from: 'gradle/publishing.gradle'