-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
85 lines (63 loc) · 2.35 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
import org.apache.tools.ant.filters.ReplaceTokens
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.0.0'
}
allprojects {
version = pluginVersion
group = pluginGroup
repositories {
mavenLocal()
mavenCentral()
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url 'https://jitpack.io' }
}
processResources {
from (sourceSets.main.resources) {
include 'plugin.yml'
filter(ReplaceTokens, tokens: ['version' : project.version])
}
}
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT'
implementation 'commons-io:commons-io:2.7'
implementation 'dev.array21:bukkit-reflection-util:1.2.0'
implementation 'dev.array21:classvalidator:1.0.0'
implementation 'dev.array21:httplib:1.2.2'
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
task testJar(type: ShadowJar) {
description 'Build a test Jar'
archiveClassifier = 'DEV'
from sourceSets.main.output
configurations = [project.configurations.runtimeClasspath]
relocate 'org.apache.commons.io', 'dev.array21.harotorch.libs.org.apache.commons.io'
relocate 'dev.array21.httplib', 'dev.array21.harotorch.libs.dev.array21.httplib'
destinationDirectory = file("$rootDir/server/plugins")
}
task releaseJar(type: ShadowJar) {
description 'Build a release Jar'
archiveClassifier = 'RELEASE'
from sourceSets.main.output
configurations = [project.configurations.runtimeClasspath]
relocate 'org.apache.commons.io', 'dev.array21.harotorch.libs.org.apache.commons.io'
relocate 'dev.array21.httplib', 'dev.array21.harotorch.libs.dev.array21.httplib'
destinationDirectory = file("$rootDir/releases")
}
task ghActions(type: ShadowJar) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
description 'GitHub Actions task. Not used for regular development'
version = ''
archiveClassifier = ''
archiveBaseName = 'output'
from sourceSets.main.output
configurations = [project.configurations.runtimeClasspath]
relocate 'org.apache.commons.io', 'dev.array21.harotorch.libs.org.apache.commons.io'
relocate 'dev.array21.httplib', 'dev.array21.harotorch.libs.dev.array21.httplib'
destinationDirectory = file("$rootDir/actions")
}