-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
45 lines (37 loc) · 1.15 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'com.gradleup.shadow' version '8.3.6'
}
group = 'com.github.twitch4j'
version = '1.0.0'
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
// Repositories
repositories {
mavenCentral()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
}
// Dependencies
dependencies {
// Minecraft server environment (provided)
compileOnly group: 'org.spigotmc', name: 'spigot-api', version: '1.21.4-R0.1-SNAPSHOT'
// Twitch4J
implementation group: 'com.github.twitch4j', name: 'twitch4j', version: '1.24.0'
}
// Ensure plugin.yml has the version defined here
processResources {
from(sourceSets.main.resources.srcDirs) {
duplicatesStrategy DuplicatesStrategy.INCLUDE // config, logback, and plugin yml files are not dupes - https://github.com./gradle/gradle/issues/17236
filter ReplaceTokens, tokens: [version: version]
}
}
tasks.named('shadowJar', ShadowJar) {
relocate 'com.fasterxml.jackson', 'shaded.com.fasterxml.jackson'
}