1
- buildscript {
2
- ext. kotlin_version = ' 1.5.21'
3
- repositories {
4
- jcenter()
5
- maven {
6
- url " https://plugins.gradle.org/m2/"
7
- }
8
-
9
- }
10
-
11
- dependencies {
12
- classpath " com.github.jengelman.gradle.plugins:shadow:4.0.4"
13
- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
14
- }
15
- }
16
-
17
1
plugins {
18
2
id ' java' apply true
19
- id ' org.jetbrains.kotlin.jvm' version ' 1.5.21'
20
- id ' net.nemerosa.versioning' version ' 2.14.0'
21
- id " io.freefair.lombok" version " 5.3.0"
3
+ id ' org.jetbrains.kotlin.jvm' version ' 1.6.0'
4
+ id ' net.nemerosa.versioning' version ' 2.15.1'
5
+ id " io.freefair.lombok" version " 6.3.0"
6
+ id ' com.github.johnrengelman.shadow' version ' 7.1.0'
22
7
id ' signing'
23
8
id ' maven-publish'
24
9
}
@@ -31,14 +16,10 @@ apply plugin: 'kotlin'
31
16
32
17
archivesBaseName = " FernAPI"
33
18
34
- sourceCompatibility = targetCompatibility = ' 1.8' // Need this here so eclipse task generates correctly.
35
- compileJava {
36
- sourceCompatibility = targetCompatibility = ' 1.8'
37
- }
38
-
39
19
40
20
allprojects {
41
21
apply plugin : ' java'
22
+ apply plugin : ' kotlin'
42
23
// apply plugin: 'maven'
43
24
apply plugin : ' com.github.johnrengelman.shadow'
44
25
apply plugin : ' maven-publish'
@@ -50,8 +31,8 @@ allprojects {
50
31
// version = versioning.info.full
51
32
ext. buildVer = " 1.9.0"
52
33
ext. aikarVer = " 0.5.0-SNAPSHOT"
53
- ext. adventureAPI = " 4.8.1 "
54
- ext. adventureAPIPlatform = " 4.0.0-SNAPSHOT "
34
+ ext. adventureAPI = " 4.9.3 "
35
+ ext. adventureAPIPlatform = " 4.0.0"
55
36
ext. slf4j_ver = " 1.7.30"
56
37
project. ext. beta_version = ' 4' // Only modify when beta
57
38
ext. beta_prefix = ' rc'
@@ -76,11 +57,11 @@ allprojects {
76
57
full = {
77
58
scmInfo ->
78
59
79
- GString suffix = " ${ scmInfo.branch} "
60
+ String suffix = " ${ scmInfo.branch} "
80
61
81
62
if (suffix == ' beta' ) suffix + = " ${ project.beta_version} "
82
63
83
- GString num = scmInfo. tag != null ? " ${ scmInfo.tag} " : " ${ scmInfo.abbreviated} .h-${ suffix} "
64
+ String num = scmInfo. tag != null ? " ${ scmInfo.tag} " : " ${ scmInfo.abbreviated} .h-${ suffix} "
84
65
85
66
return " ${ num} "
86
67
@@ -129,7 +110,7 @@ allprojects {
129
110
}
130
111
131
112
132
- GString tagVer = " ${ buildVer}${ beta_prefix}${ project.beta_version} "
113
+ String tagVer = " ${ buildVer}${ beta_prefix}${ project.beta_version} "
133
114
// If being worked on
134
115
version = versioning. info. tag != null ? versioning. info. tag : " v${ tagVer} -${ versioning.info.branch} -${ versioning.info.build} "
135
116
@@ -141,6 +122,7 @@ allprojects {
141
122
142
123
from(sourceSets. main. resources. srcDirs) {
143
124
include ' fernapi_version.json'
125
+ duplicatesStrategy = DuplicatesStrategy . WARN ;
144
126
145
127
146
128
expand ' fernapi_version' : project. version
@@ -159,7 +141,6 @@ allprojects {
159
141
url " https://libraries.minecraft.net"
160
142
}
161
143
162
- jcenter()
163
144
maven { url " https://jitpack.io" }
164
145
mavenCentral()
165
146
maven {
@@ -174,29 +155,36 @@ allprojects {
174
155
implementation fileTree(include : [' *.jar' ], dir : ' libs' )
175
156
176
157
api " net.kyori:adventure-api:$adventureAPI "
177
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version "
178
-
179
- compile group : ' com.google.code.findbugs' , name : ' annotations' , version : ' 3.0.1u2'
180
-
181
- // compileOnly 'org.projectlombok:lombok:1.18.12'
182
- // annotationProcessor 'org.projectlombok:lombok:1.18.12'
158
+ api " net.kyori:adventure-text-serializer-legacy:$adventureAPI "
159
+ implementation group : ' com.google.code.findbugs' , name : ' annotations' , version : ' 3.0.1u2'
183
160
}
184
161
185
- sourceCompatibility = targetCompatibility = ' 1.8' // Need this here so eclipse task generates correctly.
162
+ sourceCompatibility = targetCompatibility = JavaVersion . VERSION_17
163
+ // sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
186
164
187
165
compileJava {
188
- sourceCompatibility = targetCompatibility = ' 1.8 '
166
+ sourceCompatibility = targetCompatibility = JavaVersion . VERSION_17
189
167
options. compilerArgs + = [" -parameters" ]
190
168
options. fork = true
191
169
options. forkOptions. executable = ' javac'
192
170
}
193
171
172
+ tasks. withType(JavaCompile ). configureEach {
173
+ options. encoding = " utf-8"
174
+
175
+ if (JavaVersion . current(). isJava10Compatible()) {
176
+ options. release. set(17 )
177
+ }
178
+ }
179
+
194
180
compileKotlin {
195
181
kotlinOptions. javaParameters = true
182
+ kotlinOptions. jvmTarget = sourceCompatibility
196
183
}
197
184
198
185
shadowJar {
199
186
minimize()
187
+ mergeServiceFiles()
200
188
relocate ' co.aikar.commands' , " ${ project.group} .acf"
201
189
relocate ' co.aikar.locales' , " ${ project.group} .locales"
202
190
relocate ' co.aikar.idb' , " ${ project.group} .idb"
@@ -289,7 +277,7 @@ allprojects {
289
277
configure(subprojects. findAll {it. name != ' core' }) {
290
278
afterEvaluate {
291
279
dependencies {
292
- compile (project(' :core' ))
280
+ implementation (project(' :core' ))
293
281
}
294
282
}
295
283
}
@@ -306,90 +294,3 @@ configure(subprojects.findAll {it.name != 'all'}) {
306
294
}
307
295
}
308
296
}
309
-
310
-
311
- repositories {
312
- mavenCentral()
313
- }
314
- dependencies {
315
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version "
316
- }
317
- compileKotlin {
318
- kotlinOptions {
319
- jvmTarget = " 1.8"
320
- }
321
- }
322
- compileTestKotlin {
323
- kotlinOptions {
324
- jvmTarget = " 1.8"
325
- }
326
- }
327
-
328
- //
329
- // repositories {
330
- // maven {
331
- // name = 'spigotmc-repo'
332
- // url = 'https://hub.spigotmc.org/nexus/content/groups/public/'
333
- // }
334
- //
335
- // maven {
336
- // name = 'sonatype'
337
- // url = 'https://oss.sonatype.org/content/groups/public/'
338
- // }
339
- //
340
- //
341
- // maven {
342
- // name = 'placeholderapi'
343
- // url = 'http://repo.extendedclip.com/content/repositories/placeholderapi/'
344
- // }
345
- //
346
- // maven {
347
- // name 'velocity'
348
- // url 'https://repo.velocitypowered.com/snapshots/'
349
- // }
350
- //
351
- // flatDir {
352
- // dirs 'libs'
353
- // }
354
- //
355
- // jcenter()
356
- // maven { url "https://jitpack.io" }
357
- // mavenCentral()
358
- // }
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
- //
367
- // dependencies {
368
- // implementation fileTree(include: ['*.jar'], dir: 'libs')
369
- // compileOnly 'com.google.code.gson:gson:2.6.2'
370
- // //compileOnly 'org.spigotmc:spigot-api:1.8-R0.1-SNAPSHOT'
371
- // compileOnly 'org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT' // The Spigot API with no shadowing. Requires the OSS repo.
372
- // compileOnly 'net.md-5:bungeecord-api:1.14-SNAPSHOT'
373
- // compileOnly group: 'me.clip', name: 'placeholderapi', version: '2.9.2'
374
- // compileOnly 'org.spongepowered:spongeapi:7.1.0'
375
- // compileOnly 'com.velocitypowered:velocity-api:1.1.0-SNAPSHOT'
376
- // annotationProcessor 'com.velocitypowered:velocity-api:1.1.0-SNAPSHOT'
377
- // // compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.17'
378
- // compile 'org.mariadb.jdbc:mariadb-java-client:2.1.2'
379
- // compile 'com.github.Fernthedev:fern-configmanager:1.1.2' // Check github releases tag for the version.
380
- //
381
- // compileOnly ('com.github.Fernthedev:VaultAPI:7.0') {
382
- // exclude group: 'org.bukkit'
383
- // }
384
- // // 2. Use Guava types in your public API:
385
- // compile("com.google.guava:guava:28.1-jre")
386
- // //
387
- // compileOnly 'org.projectlombok:lombok:1.18.8'
388
- // annotationProcessor 'org.projectlombok:lombok:1.18.8'
389
- //
390
- //
391
- // // implementation 'com.google.guava:guava:22.0'
392
- // }
393
-
394
-
395
-
0 commit comments