-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
87 lines (74 loc) · 2.16 KB
/
build.gradle
File metadata and controls
87 lines (74 loc) · 2.16 KB
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
plugins {
id 'java-library'
id 'maven-publish'
id 'io.freefair.lombok' version "6.0.0-m2"
id 'com.github.johnrengelman.shadow' version "7.0.0"
}
def major = 0, minor = 1, micro = 13
version "$major.$minor.$micro"
group "com.github.worldOneo"
repositories {
mavenCentral()
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
content {
includeGroup 'org.spigotmc'
}
}
maven {
url = "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url = "https://jitpack.io"
}
}
dependencies {
//Particle legacy sup
compileOnly "org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT"
compileOnly "org.spigotmc:spigot-api:${MCVERSION}"
compileOnly "net.md-5:bungeecord-api:${BUNGEEVERSION}"
implementation group: 'org.jetbrains', name: 'annotations', version: JETBRAINSANNOTATIONSVERSION
shadow "com.zaxxer:HikariCP:${HIKARICPVERSION}"
shadow "org.slf4j:slf4j-nop:1.7.30"
}
processResources {
setDuplicatesStrategy(DuplicatesStrategy.INCLUDE)
from(sourceSets.main.resources.srcDirs) {
expand(["VERSION": version, "NAME": rootProject.name])
include '*.yml'
}
}
shadowJar {
from('licenses') {
include '*'
}
archiveFileName = "$rootProject.name-$rootProject.version.${archiveExtension.get()}"
configurations = [project.configurations.shadow]
relocate 'com.zaxxer.hikari', 'de.worldoneo.spijetapi.hikari'
}
task githubJar(type: Copy, dependsOn: shadowJar) {
def libsDir = file(getLibsDirectory().get())
def shadowArchive = shadowJar.archiveFileName.get()
from(libsDir)
include shadowArchive
destinationDir libsDir
rename shadowArchive, 'SpiJetAPI-GitHub.jar'
}
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) {
artifact javadocJar
artifact sourcesJar
artifact shadowJar
artifact jar
}
}
}