-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
72 lines (59 loc) · 1.62 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
apply plugin: 'java'
apply plugin: 'maven-publish'
group = pluginGroup
version = pluginVersion
if(System.getenv("BUILD_NUMBER") != null)
pluginVersion += "." + System.getenv("BUILD_NUMBER")
version = pluginVersion
[compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
mavenCentral()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
implementation 'io.netty:netty-all:4.1.25.Final'
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
from(sourceSets.main.allSource) {
filter ReplaceTokens, tokens: [version: version]
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier 'sources'
}
task javadocJar(type: Jar, dependsOn: 'javadoc') {
from "${buildDir}/docs/javadoc"
classifier 'javadoc'
}
task publishJar(type: Jar, dependsOn: ['classes', 'processResources']) {
from("${buildDir}/classes/java/main") {
exclude '**/plugin.yml'
}
from "${buildDir}/resources/main/plugin.yml"
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact publishJar
artifact sourcesJar
artifact javadocJar
}
}
repositories {
maven {
url 'file:///' + System.getenv('NATIVE_MAVEN_PATH')
}
}
}