mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 04:23:54 +00:00
Switch to version catalogs
- Closes #1204 - Switch to security advisory - Move fawe-tests to fawe packages
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.JavaPluginExtension
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||
import org.gradle.jvm.toolchain.JvmVendorSpec
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.get
|
||||
import org.gradle.kotlin.dsl.repositories
|
||||
import org.gradle.kotlin.dsl.the
|
||||
|
||||
@ -56,15 +54,15 @@ fun Project.applyCommonConfiguration() {
|
||||
continue
|
||||
}
|
||||
add(conf.name, "com.google.guava:guava") {
|
||||
version { require(Versions.GUAVA) }
|
||||
version { require("21.0") }
|
||||
because("Mojang provides Guava")
|
||||
}
|
||||
add(conf.name, "com.google.code.gson:gson") {
|
||||
version { require(Versions.GSON) }
|
||||
version { require("2.8.0") }
|
||||
because("Mojang provides Gson")
|
||||
}
|
||||
add(conf.name, "it.unimi.dsi:fastutil") {
|
||||
version { require(Versions.FAST_UTIL) }
|
||||
version { require("8.2.1") }
|
||||
because("Mojang provides FastUtil")
|
||||
}
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ fun Project.applyLibrariesConfiguration() {
|
||||
exclude(dependency("com.google.code.gson:gson"))
|
||||
exclude(dependency("org.checkerframework:checker-qual"))
|
||||
exclude(dependency("org.apache.logging.log4j:log4j-api"))
|
||||
exclude(dependency("com.google.code.findbugs:jsr305"))
|
||||
}
|
||||
|
||||
relocations.forEach { (from, to) ->
|
||||
|
@ -1,6 +1,7 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.attributes.java.TargetJvmVersion
|
||||
import org.gradle.api.plugins.JavaPluginConvention
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.gradle.api.tasks.compile.JavaCompile
|
||||
@ -44,18 +45,22 @@ fun Project.applyPlatformAndCoreConfiguration() {
|
||||
options.compilerArgs.add("-parameters")
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 16)
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
"testImplementation"("org.junit.jupiter:junit-jupiter-api:${Versions.JUNIT}")
|
||||
"testImplementation"("org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT}")
|
||||
"testImplementation"("org.mockito:mockito-core:${Versions.MOCKITO}")
|
||||
"testImplementation"("org.mockito:mockito-junit-jupiter:${Versions.MOCKITO}")
|
||||
"testImplementation"("net.bytebuddy:byte-buddy:1.11.0")
|
||||
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:${Versions.JUNIT}")
|
||||
"compileOnly"("com.google.code.findbugs:jsr305:3.0.2")
|
||||
"testImplementation"("org.junit.jupiter:junit-jupiter-api:5.7.2")
|
||||
"testImplementation"("org.junit.jupiter:junit-jupiter-params:5.7.2")
|
||||
"testImplementation"("org.mockito:mockito-core:3.11.2")
|
||||
"testImplementation"("org.mockito:mockito-junit-jupiter:3.11.2")
|
||||
"testImplementation"("net.bytebuddy:byte-buddy:1.11.9")
|
||||
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:3.11.2")
|
||||
}
|
||||
|
||||
// Java 8 turns on doclint which we fail
|
||||
|
@ -1,22 +0,0 @@
|
||||
import org.gradle.api.Project
|
||||
|
||||
object Versions {
|
||||
const val TEXT = "3.0.4"
|
||||
const val TEXT_EXTRAS = "3.0.6"
|
||||
const val PISTON = "0.5.7"
|
||||
const val AUTO_VALUE = "1.7.4"
|
||||
const val JUNIT = "5.7.0"
|
||||
const val MOCKITO = "3.9.0"
|
||||
const val FAST_UTIL = "8.2.1"
|
||||
const val GUAVA = "21.0"
|
||||
const val GSON = "2.8.0"
|
||||
}
|
||||
|
||||
// Properties that need a project reference to resolve:
|
||||
class ProjectVersions(project: Project) {
|
||||
val loom = project.rootProject.property("loom.version")
|
||||
val mixin = project.rootProject.property("mixin.version")
|
||||
}
|
||||
|
||||
val Project.versions
|
||||
get() = ProjectVersions(this)
|
Reference in New Issue
Block a user