-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
124 lines (105 loc) · 3.72 KB
/
build.gradle
File metadata and controls
124 lines (105 loc) · 3.72 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
plugins {
id 'java'
id 'io.github.goooler.shadow' version "8.1.7"
id 'maven-publish'
}
group = 'com.thoxia'
version = '1.1.0'
repositories {
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven { url "https://storehouse.okaeri.eu/repository/maven-public/" }
maven { url 'https://repo.triumphteam.dev/snapshots/' }
maven { url 'https://jitpack.io' }
maven { url 'https://repo.xenondevs.xyz/releases' }
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
maven { url 'https://repo.essentialsx.net/releases/' }
mavenCentral()
}
dependencies {
compileOnly('org.projectlombok:lombok:1.18.30')
annotationProcessor 'org.projectlombok:lombok:1.18.30'
implementation 'org.bstats:bstats-bukkit:3.0.2'
implementation 'eu.okaeri:okaeri-configs-yaml-bukkit:5.0.0-beta.5'
implementation ("dev.triumphteam:triumph-cmd-bukkit:2.0.0-SNAPSHOT") { exclude group: "com.google.code.gson" }
implementation "xyz.xenondevs.invui:invui:1.43"
implementation "net.kyori:adventure-api:4.18.0"
implementation "net.kyori:adventure-text-minimessage:4.18.0"
implementation "net.kyori:adventure-platform-bukkit:4.3.4"
implementation 'com.github.PiggyPiglet:TimeAPI:1.3.1'
// mute managers
compileOnly 'net.essentialsx:EssentialsX:2.20.1'
compileOnly 'com.gitlab.ruany:LiteBansAPI:0.5.0'
compileOnly 'com.github.DevLeoko:AdvancedBan:v2.2.1'
// integration plugins
compileOnly ("com.github.MilkBowl:VaultAPI:1.7") {
exclude group: "org.bukkit"
}
compileOnly 'me.clip:placeholderapi:2.11.6'
compileOnly "com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT"
}
def targetJavaVersion = 16
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
build {
dependsOn shadowJar
}
shadowJar {
dependsOn(jar)
archiveFileName = "${project.name} v${archiveVersion.get()}.jar"
relocate 'org.bstats', 'com.thoxia.playerads.libraries.bstats'
relocate 'eu.okaeri', 'com.thoxia.playerads.libraries.config'
relocate 'net.kyori', 'com.thoxia.playerads.libraries.adventure'
relocate 'xyz.xenondevs', 'com.thoxia.playerads.libraries.gui'
relocate 'dev.triumphteam.cmd', 'com.thoxia.playerads.libraries.cmd'
relocate 'sh.okx.timeapi', 'com.thoxia.playerads.libraries.timeapi'
from sourceSets.getByName("main").output
configurations = [project.configurations.getByName("runtimeClasspath")]
}
publishing {
repositories {
maven {
credentials {
username = System.getenv("THOXIA_REPO_USERNAME")
password = System.getenv("THOXIA_REPO_PASSWORD")
}
url = "https://repo.thoxia.com/releases"
}
}
publications {
maven(MavenPublication) {
groupId = "com.thoxia"
artifactId = "PlayerAds"
version = "${version}"
from components.java
}
}
}