forked from Artillex-Studios/AxAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
124 lines (105 loc) · 3.28 KB
/
build.gradle
File metadata and controls
124 lines (105 loc) · 3.28 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 'maven-publish'
id 'com.gradleup.shadow' version '9.2.2'
}
group = 'com.artillexstudios.axapi'
version = property("version")
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
dependencies {
implementation project(path: ":api")
implementation project(path: ":folia")
implementation project(path: ":nms:v1_21_R7", configuration: "reobf")
implementation project(path: ":nms:v1_21_R6", configuration: "reobf")
implementation project(path: ":nms:v1_21_R5", configuration: "reobf")
}
allprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'com.gradleup.shadow'
compileJava {
options.compilerArgs += ["-parameters"]
options.encoding = "UTF-8"
options.fork = true
dependsOn(clean)
}
repositories {
mavenCentral()
maven {
name = 'Artillex-Studios'
url = 'https://repo.artillex-studios.com/releases/'
}
maven {
name = 'PaperMC'
url = 'https://repo.papermc.io/repository/maven-public/'
}
maven {
name = 'PlaceholderAPI'
url = 'https://repo.extendedclip.com/releases/'
}
maven {
name = 'JitPack'
url = 'https://jitpack.io/'
}
}
dependencies {
compileOnly("com.github.ben-manes.caffeine:caffeine:3.2.3")
compileOnly("org.apache.commons:commons-math3:3.6.1")
compileOnly("it.unimi.dsi:fastutil-core:8.5.12")
compileOnly("me.clip:placeholderapi:2.11.5")
compileOnly("it.unimi.dsi:fastutil:8.5.12")
}
publishing {
afterEvaluate {
repositories {
maven {
name = "Artillex-Studios"
url = "https://repo.artillex-studios.com/releases"
credentials {
it.username = ""
it.password = ""
}
}
}
publications {
shadow(MavenPublication) { ->
artifactId = "axapi-cnw"
from components.shadow
println("Project: ${project.name}")
if (project.name == "api") {
artifact tasks.javadocJar
}
}
}
}
}
publishToMavenLocal {
dependsOn {
build
}
}
configurations.configureEach {
resolutionStrategy {
force 'net.kyori:adventure-text-minimessage:4.14.0'
}
}
}
tasks.build.dependsOn(shadowJar)
shadowJar {
relocate('dev.dejvokep.boostedyaml', 'com.artillexstudios.axapi.libs.boostedyaml')
relocate('me.neznamy.yamlassist', 'com.artillexstudios.axapi.libs.yamlassist')
relocate('org.apache.commons.math3', 'com.artillexstudios.axapi.libs.math3')
relocate('com.github.benmanes', 'com.artillexstudios.axapi.libs.caffeine')
relocate('org.yaml.snakeyaml', 'com.artillexstudios.axapi.libs.snakeyaml')
relocate('com.zaxxer.hikari', 'com.artillexstudios.axapi.libs.hikari')
}
allprojects.forEach {
it.afterEvaluate {
println(it.name + " " + it.group + " " + it.version)
}
}