mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-12-28 17:37:52 +01:00
Fix some gradle deprecations
This commit is contained in:
parent
24bfaf7283
commit
9df89b1f1c
29
build.gradle
29
build.gradle
@ -4,6 +4,7 @@ plugins {
|
||||
alias(libs.plugins.blossom) apply false
|
||||
alias(libs.plugins.indra.git) apply false
|
||||
alias(libs.plugins.dependencydownload.plugin) apply false
|
||||
alias(libs.plugins.idea.ext) apply false
|
||||
}
|
||||
|
||||
version '3.0.0-SNAPSHOT'
|
||||
@ -12,8 +13,8 @@ subprojects {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
//apply plugin: 'org.cadixdev.licenser'
|
||||
apply plugin: 'io.github.goooler.shadow'
|
||||
apply plugin: 'net.minecraftforge.licenser'
|
||||
apply plugin: 'net.kyori.indra.git'
|
||||
apply plugin: 'dev.vankka.dependencydownload.plugin'
|
||||
|
||||
@ -98,8 +99,6 @@ subprojects {
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
|
||||
testLogging {
|
||||
exceptionFormat = 'full'
|
||||
}
|
||||
@ -115,7 +114,7 @@ subprojects {
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
|
||||
// If CI then check that licenses are correct, otherwise automatically apply licenses on build
|
||||
// dependsOn (System.getenv('CI') === 'true' ? licenseCheck : licenseFormat)
|
||||
dependsOn (System.getenv('CI') === 'true' ? licenseCheck : licenseFormat)
|
||||
// Always run shadowJar
|
||||
finalizedBy shadowJar
|
||||
|
||||
@ -171,14 +170,14 @@ subprojects {
|
||||
}
|
||||
|
||||
|
||||
// license {
|
||||
// header = rootProject.file('buildscript/license/LICENSE_HEADER')
|
||||
// properties {
|
||||
// var inception = '2016'
|
||||
// var currentYear = String.valueOf(Calendar.getInstance().get(Calendar.YEAR))
|
||||
//
|
||||
// year = inception == currentYear ? currentYear : inception + '-' + currentYear
|
||||
// }
|
||||
// include '**/*.java' // only java files
|
||||
// }
|
||||
license {
|
||||
header = rootProject.file('buildscript/license/LICENSE_HEADER')
|
||||
properties {
|
||||
var inception = '2016'
|
||||
var currentYear = String.valueOf(Calendar.getInstance().get(Calendar.YEAR))
|
||||
|
||||
year = inception == currentYear ? currentYear : inception + '-' + currentYear
|
||||
}
|
||||
include '**/*.java' // only java files
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
disableAutoTargetJvm() // Requires Java 17, we target 8
|
||||
java {
|
||||
disableAutoTargetJvm() // Requires Java 17, we target 8
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Platform
|
||||
|
@ -1,4 +1,6 @@
|
||||
disableAutoTargetJvm() // Requires Java 17, we target 8
|
||||
java {
|
||||
disableAutoTargetJvm() // Requires Java 17, we target 8
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Platform
|
||||
|
@ -10,10 +10,11 @@ dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
libs {
|
||||
// Buildscript
|
||||
plugin('shadow', 'com.github.johnrengelman.shadow').version('8.1.1')
|
||||
plugin('licenser', 'org.cadixdev.licenser').version('0.6.1')
|
||||
plugin('blossom', 'net.kyori.blossom').version('1.2.0')
|
||||
plugin('shadow', 'io.github.goooler.shadow').version('8.1.7')
|
||||
plugin('licenser', 'net.minecraftforge.licenser').version('1.0.1')
|
||||
plugin('blossom', 'net.kyori.blossom').version('2.1.0')
|
||||
plugin('indra-git', 'net.kyori.indra.git').version('2.1.1')
|
||||
plugin('idea-ext', 'org.jetbrains.gradle.plugin.idea-ext').version('1.1.7')
|
||||
|
||||
// Bukkit
|
||||
version('bukkit_minimum', '1.8.8-R0.1-SNAPSHOT')
|
||||
|
@ -1,5 +1,16 @@
|
||||
apply from: rootProject.file('buildscript/standalone.gradle')
|
||||
apply plugin: 'net.kyori.blossom'
|
||||
apply plugin: 'org.jetbrains.gradle.plugin.idea-ext'
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
blossom {
|
||||
javaSources {
|
||||
property('version', project.version.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveBaseName = 'DiscordSRV-Velocity'
|
||||
@ -32,13 +43,4 @@ dependencies {
|
||||
|
||||
// DependencyDownload
|
||||
implementation(libs.mcdependencydownload.velocity)
|
||||
}
|
||||
|
||||
jar {
|
||||
dependsOn blossomSourceReplacementJava
|
||||
}
|
||||
|
||||
blossom {
|
||||
var mainClass = 'src/main/java/com/discordsrv/velocity/DiscordSRVVelocityBootstrap.java'
|
||||
replaceToken('@VERSION@', project.version, mainClass)
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.discordsrv.velocity;
|
||||
|
||||
public final class Constants {
|
||||
private Constants() {}
|
||||
|
||||
{# @pebvariable name="version" type="java.lang.String" #}
|
||||
public static final String VERSION = "{{ version }}";
|
||||
}
|
Loading…
Reference in New Issue
Block a user