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-
171plugins {
182 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'
227 id ' signing'
238 id ' maven-publish'
249}
@@ -31,14 +16,10 @@ apply plugin: 'kotlin'
3116
3217archivesBaseName = " FernAPI"
3318
34- sourceCompatibility = targetCompatibility = ' 1.8' // Need this here so eclipse task generates correctly.
35- compileJava {
36- sourceCompatibility = targetCompatibility = ' 1.8'
37- }
38-
3919
4020allprojects {
4121 apply plugin : ' java'
22+ apply plugin : ' kotlin'
4223// apply plugin: 'maven'
4324 apply plugin : ' com.github.johnrengelman.shadow'
4425 apply plugin : ' maven-publish'
@@ -50,8 +31,8 @@ allprojects {
5031// version = versioning.info.full
5132 ext. buildVer = " 1.9.0"
5233 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"
5536 ext. slf4j_ver = " 1.7.30"
5637 project. ext. beta_version = ' 4' // Only modify when beta
5738 ext. beta_prefix = ' rc'
@@ -76,11 +57,11 @@ allprojects {
7657 full = {
7758 scmInfo ->
7859
79- GString suffix = " ${ scmInfo.branch} "
60+ String suffix = " ${ scmInfo.branch} "
8061
8162 if (suffix == ' beta' ) suffix + = " ${ project.beta_version} "
8263
83- GString num = scmInfo. tag != null ? " ${ scmInfo.tag} " : " ${ scmInfo.abbreviated} .h-${ suffix} "
64+ String num = scmInfo. tag != null ? " ${ scmInfo.tag} " : " ${ scmInfo.abbreviated} .h-${ suffix} "
8465
8566 return " ${ num} "
8667
@@ -129,7 +110,7 @@ allprojects {
129110 }
130111
131112
132- GString tagVer = " ${ buildVer}${ beta_prefix}${ project.beta_version} "
113+ String tagVer = " ${ buildVer}${ beta_prefix}${ project.beta_version} "
133114 // If being worked on
134115 version = versioning. info. tag != null ? versioning. info. tag : " v${ tagVer} -${ versioning.info.branch} -${ versioning.info.build} "
135116
@@ -141,6 +122,7 @@ allprojects {
141122
142123 from(sourceSets. main. resources. srcDirs) {
143124 include ' fernapi_version.json'
125+ duplicatesStrategy = DuplicatesStrategy . WARN ;
144126
145127
146128 expand ' fernapi_version' : project. version
@@ -159,7 +141,6 @@ allprojects {
159141 url " https://libraries.minecraft.net"
160142 }
161143
162- jcenter()
163144 maven { url " https://jitpack.io" }
164145 mavenCentral()
165146 maven {
@@ -174,29 +155,36 @@ allprojects {
174155 implementation fileTree(include : [' *.jar' ], dir : ' libs' )
175156
176157 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'
183160 }
184161
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
186164
187165 compileJava {
188- sourceCompatibility = targetCompatibility = ' 1.8 '
166+ sourceCompatibility = targetCompatibility = JavaVersion . VERSION_17
189167 options. compilerArgs + = [" -parameters" ]
190168 options. fork = true
191169 options. forkOptions. executable = ' javac'
192170 }
193171
172+ tasks. withType(JavaCompile ). configureEach {
173+ options. encoding = " utf-8"
174+
175+ if (JavaVersion . current(). isJava10Compatible()) {
176+ options. release. set(17 )
177+ }
178+ }
179+
194180 compileKotlin {
195181 kotlinOptions. javaParameters = true
182+ kotlinOptions. jvmTarget = sourceCompatibility
196183 }
197184
198185 shadowJar {
199186 minimize()
187+ mergeServiceFiles()
200188 relocate ' co.aikar.commands' , " ${ project.group} .acf"
201189 relocate ' co.aikar.locales' , " ${ project.group} .locales"
202190 relocate ' co.aikar.idb' , " ${ project.group} .idb"
@@ -289,7 +277,7 @@ allprojects {
289277configure(subprojects. findAll {it. name != ' core' }) {
290278 afterEvaluate {
291279 dependencies {
292- compile (project(' :core' ))
280+ implementation (project(' :core' ))
293281 }
294282 }
295283}
@@ -306,90 +294,3 @@ configure(subprojects.findAll {it.name != 'all'}) {
306294 }
307295 }
308296}
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