forked from SMPEarth/AvatarCreatures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
82 lines (71 loc) · 2.59 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
plugins {
id 'java'
id 'maven-publish'
id 'io.freefair.lombok' version '5.3.0' apply false
id "com.github.johnrengelman.shadow" version "7.1.2"
}
repositories {
mavenCentral()
maven { url = "https://repo.aikar.co/content/groups/aikar/" }
maven { url = 'https://repo.maven.apache.org/maven2/' }
maven { url = 'https://repo.glaremasters.me/repository/towny/' }
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = 'https://oss.sonatype.org/content/repositories/central' }
}
dependencies {
implementation 'org.bstats:bstats-bukkit:3.0.0'
implementation 'com.zaxxer:HikariCP:5.0.1'
implementation 'co.aikar:acf-paper:0.5.1-SNAPSHOT'
compileOnly 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT'
compileOnly 'com.comphenix.protocol:ProtocolLib:4.8.0'
compileOnly 'org.jetbrains:annotations:23.0.0'
compileOnly 'com.palmergames.bukkit.towny:towny:0.98.2.0'
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
}
group = 'me.relavis.avatarcreatures'
version = '1.2.1'
java.sourceCompatibility = JavaVersion.VERSION_17
compileJava.options.encoding = "UTF-8"
compileJava.options.compilerArgs += ["-parameters"]
compileJava.options.fork = true
compileJava.options.forkOptions.executable = 'javac'
compileTestJava.options.encoding = "UTF-8"
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
processResources {
filesMatching("plugin.yml") {
expand("version": project.version)
}
}
String finalJarName = project.name + "-" + project.version
String finalJarPath = jar.archiveFile.get().getAsFile().getParentFile().getParentFile().getParentFile().getAbsolutePath() + "\\release\\" + project.version + "\\" + finalJarName + ".jar"
shadowJar {
dependencies {
include dependency('com.zaxxer:HikariCP')
include dependency('org.bstats:bstats-bukkit')
include dependency('co.aikar:acf-paper')
}
dependencies {
relocate('com.zaxxer.hikari', project.group + ".libraries.hikaricp")
relocate('org.bstats.bukkit', project.group + '.libraries.bstats')
relocate('co.aikar.commands', project.group + 'libraries.acf')
relocate('co.aikar.locales', project.group + 'libraries.acf.locales')
}
zip64 true
minimize()
project.configurations.implementation.canBeResolved = true
archiveFileName = finalJarPath
}
task buildRelease {
group 'AvatarCreatures'
dependsOn 'shadowJar'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}