-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
179 lines (161 loc) · 6.5 KB
/
Copy pathbuild.gradle
File metadata and controls
179 lines (161 loc) · 6.5 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.7.0'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'nu.studer.jooq' version '7.1.1'
}
group = 'com.dansplugins'
version = '3.0.0-SNAPSHOT-8-8-2026'
def repoUsername = ""
def repoPassword = ""
def propertiesFile = new File("repo.properties")
if (propertiesFile.exists()) {
def properties = new Properties()
properties.load(new FileInputStream(propertiesFile))
repoUsername = properties.getProperty("username")
repoPassword = properties.getProperty("password")
}
repositories {
mavenCentral()
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/public/' }
maven { url 'https://oss.sonatype.org/content/groups/public/' }
maven { url 'https://repo.mikeprimm.com/' }
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
maven { url 'https://jitpack.io' }
maven { url 'https://repo.rpkit.com/repository/maven-public/' }
maven { url 'https://repo.dansplugins.com/repository/maven-public/' }
flatDir {
dirs 'lib'
}
}
configurations {
flywayMigration
}
dependencies {
implementation 'org.spigotmc:spigot-api:1.19.2-R0.1-SNAPSHOT'
compileOnly files('lib/medieval-factions-5.5.0.jar')
implementation 'org.bstats:bstats-bukkit:3.0.0'
implementation 'com.dansplugins:ponder-bukkit:2.0.0'
implementation 'me.clip:placeholderapi:2.11.6'
implementation platform("dev.forkhandles:forkhandles-bom:2.2.0.0")
implementation 'dev.forkhandles:result4k'
implementation 'org.jooq:jooq:3.17.4'
implementation 'org.flywaydb:flyway-core:9.4.0'
implementation 'org.flywaydb:flyway-mysql:9.4.0'
implementation 'org.mariadb.jdbc:mariadb-java-client:3.0.6'
implementation 'com.h2database:h2:2.1.214'
implementation 'com.zaxxer:HikariCP:5.0.1'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'org.slf4j:slf4j-api:1.8.0-beta4'
implementation 'com.dansplugins:ponder-commands:2.0.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
testImplementation 'io.mockk:mockk:1.13.2'
// Declared compileOnly above, but mocking Currencies requires its Medieval Factions
// members to be resolvable at test runtime.
testImplementation files('lib/medieval-factions-5.5.0.jar')
jooqGenerator 'org.jooq:jooq-meta-extensions:3.17.4'
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
import org.jooq.meta.jaxb.Logging
jooq {
configurations {
main {
generationTool {
logging = Logging.WARN
generator {
name = 'org.jooq.codegen.DefaultGenerator'
database {
name = 'org.jooq.meta.extensions.ddl.DDLDatabase'
inputSchema = 'PUBLIC'
includes = '.*'
excludes = ''
properties {
property {
key = "scripts"
value = "src/main/resources/com/dansplugins/currencies/db/migration"
}
property {
key = "sort"
value = "semantic"
}
property {
key = "defaultNameCase"
value = "lower"
}
}
}
target {
packageName = 'com.dansplugins.currencies.jooq'
}
}
}
}
}
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
filter ReplaceTokens, tokens: [
'version': version
]
}
shadowJar {
mergeServiceFiles()
dependencies {
// Everything else is deliberately not bundled: Medieval Factions already
// shades those libraries and Currencies borrows them at runtime. Ponder is
// the exception — no Medieval Factions build ships it, so relocating into
// MF's namespace pointed at classes that were never there. Bundle it here.
include(dependency('com.dansplugins:ponder-bukkit'))
include(dependency('com.dansplugins:ponder-commands'))
}
// Exclude the medieval-factions jar file specifically
exclude 'lib/medieval-factions-5.5.0.jar'
relocate 'com.google', 'com.dansplugins.factionsystem.shadow.com.google'
relocate 'org.mariadb', 'com.dansplugins.factionsystem.shadow.org.mariadb'
relocate 'com.sun', 'com.dansplugins.factionsystem.shadow.com.sun'
relocate 'com.zaxxer', 'com.dansplugins.factionsystem.shadow.com.zaxxer'
relocate 'dev.forkhandles', 'com.dansplugins.factionsystem.shadow.dev.forkhandles'
relocate 'google', 'com.dansplugins.factionsystem.shadow.google'
relocate 'io.r2dbc', 'com.dansplugins.factionsystem.shadow.io.r2dbc'
relocate 'jakarta', 'com.dansplugins.factionsystem.shadow.jakarta'
relocate 'kotlin', 'com.dansplugins.factionsystem.shadow.kotlin'
relocate 'org.bstats', 'com.dansplugins.factionsystem.shadow.org.bstats'
relocate 'org.flywaydb', 'com.dansplugins.factionsystem.shadow.org.flywaydb'
relocate 'org.h2', 'com.dansplugins.factionsystem.shadow.org.h2'
relocate 'org.intellij', 'com.dansplugins.factionsystem.shadow.org.intellij'
relocate 'org.jetbrains', 'com.dansplugins.factionsystem.shadow.org.jetbrains'
relocate 'org.jooq', 'com.dansplugins.factionsystem.shadow.org.jooq'
relocate 'org.reactivestreams', 'com.dansplugins.factionsystem.shadow.org.reactivestreams'
relocate 'preponderous.ponder', 'com.dansplugins.currencies.shadow.preponderous.ponder'
}
artifacts {
archives shadowJar
}
tasks.named('test') {
useJUnitPlatform()
}
publishing {
repositories {
maven {
credentials {
username repoUsername
password repoPassword
}
def releasesRepoUrl = "https://repo.dansplugins.com/repository/maven-releases/"
def snapshotsRepoUrl = "https://repo.dansplugins.com/repository/maven-snapshots/"
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
}
}
publications {
maven(MavenPublication) { publication ->
groupId = project.group
artifactId = project.name
version = project.version
from components.java
}
}
}