build: Bump dependency versions

various gradle plugins
bump asm to 9.4 for compat with newer Java versions
misc build-time dependencies
This commit is contained in:
zml committed 2022-10-15 22:29:28 -07:00
1 parent 2195961994
commit d8332fccdd
18 files changed
+182 -92

No files matched your search

+13 -10
View File
@@ -1,18 +1,21 @@
plugins { plugins {
id "java-gradle-plugin" id "java-gradle-plugin"
id "org.spongepowered.gradle.sponge.dev" version "2.0.2" id "org.spongepowered.gradle.sponge.dev" version "2.1.1"
}
repositories {
maven {
url = "https://repo.spongepowered.org/repository/maven-public"
name = "sponge"
}
} }
dependencies { dependencies {
api("com.google.code.gson:gson:2.9.0") api("com.google.code.gson:gson:2.9.1")
implementation("gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.1.5") implementation("gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.1.6")
}
indraSpotlessLicenser {
def parentProject = gradle.parent.rootProject
licenseHeaderFile(parentProject.file('HEADER.txt'))
property("name", "Sponge")
property("organization", parentProject.ext.organization)
property("url", parentProject.ext.projectUrl)
} }
gradlePlugin { gradlePlugin {
+14
View File
@@ -1 +1,15 @@
pluginManagement {
repositories {
maven {
url = "https://repo.spongepowered.org/repository/maven-public"
name = "sponge"
}
}
}
dependencyResolutionManagement {
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
repositories { pluginManagement.repositories.each { add(it) } }
}
rootProject.name = "build-logic" rootProject.name = "build-logic"
@@ -1,3 +1,27 @@
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.gradle.impl; package org.spongepowered.gradle.impl;
import org.gradle.api.tasks.Copy; import org.gradle.api.tasks.Copy;
@@ -1,5 +1,5 @@
/* /*
* This file is part of spongegradle-convention, licensed under the MIT License (MIT). * This file is part of Sponge, licensed under the MIT License (MIT).
* *
* Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors * Copyright (c) contributors
@@ -1,3 +1,27 @@
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.gradle.impl; package org.spongepowered.gradle.impl;
import org.gradle.api.Project; import org.gradle.api.Project;
@@ -1,3 +1,27 @@
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.gradle.impl; package org.spongepowered.gradle.impl;
import org.gradle.api.Plugin; import org.gradle.api.Plugin;
@@ -1,3 +1,27 @@
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.gradle.impl; package org.spongepowered.gradle.impl;
import org.gradle.api.Plugin; import org.gradle.api.Plugin;
+7 -11
View File
@@ -5,9 +5,9 @@ plugins {
`java-library` `java-library`
eclipse eclipse
id("org.spongepowered.gradle.vanilla") id("org.spongepowered.gradle.vanilla")
id("org.cadixdev.licenser")
id("com.github.johnrengelman.shadow") id("com.github.johnrengelman.shadow")
id("org.spongepowered.gradle.sponge.dev") apply false // for version json generation id("org.spongepowered.gradle.sponge.dev") apply false // for version json generation
id("net.kyori.indra.licenser.spotless")
id("implementation-structure") id("implementation-structure")
id("org.jetbrains.gradle.plugin.idea-ext") id("org.jetbrains.gradle.plugin.idea-ext")
id("com.github.ben-manes.versions") id("com.github.ben-manes.versions")
@@ -211,16 +211,12 @@ dependencies {
val organization: String by project val organization: String by project
val projectUrl: String by project val projectUrl: String by project
license { indraSpotlessLicenser {
properties { licenseHeaderFile(rootProject.file("HEADER.txt"))
this["name"] = "Sponge"
this["organization"] = organization
this["url"] = projectUrl
}
header(rootProject.file("HEADER.txt"))
include("**/*.java") property("name", "Sponge")
newLine(false) property("organization", organization)
property("url", projectUrl)
} }
idea { idea {
@@ -247,7 +243,7 @@ allprojects {
apply(plugin = "org.jetbrains.gradle.plugin.idea-ext") apply(plugin = "org.jetbrains.gradle.plugin.idea-ext")
apply(plugin = "java-library") apply(plugin = "java-library")
apply(plugin = "maven-publish") apply(plugin = "maven-publish")
apply(plugin = "org.cadixdev.licenser") apply(plugin = "net.kyori.indra.licenser.spotless")
base { base {
archivesBaseName = name.toLowerCase(Locale.ENGLISH) archivesBaseName = name.toLowerCase(Locale.ENGLISH)
+6 -10
View File
@@ -220,7 +220,7 @@ dependencies {
val libraries = forgeLibrariesConfig.name val libraries = forgeLibrariesConfig.name
libraries("org.spongepowered:spongeapi:$apiVersion") libraries("org.spongepowered:spongeapi:$apiVersion")
libraries("javax.inject:javax.inject:1") // wat libraries("javax.inject:javax.inject:1") // wat
libraries("com.zaxxer:HikariCP:2.6.3") libraries("com.zaxxer:HikariCP:2.7.8")
libraries("org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion") libraries("org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion")
// libraries(project(commonProject.path)) // todo: this is better, but seems to be pulling in ASM for some reason // libraries(project(commonProject.path)) // todo: this is better, but seems to be pulling in ASM for some reason
libraries(platform("net.kyori:adventure-bom:$apiAdventureVersion")) libraries(platform("net.kyori:adventure-bom:$apiAdventureVersion"))
@@ -461,16 +461,12 @@ afterEvaluate {
} }
} }
license { indraSpotlessLicenser {
properties { licenseHeaderFile(rootProject.file("HEADER.txt"))
this["name"] = "Sponge"
this["organization"] = organization
this["url"] = projectUrl
}
header(rootProject.file("HEADER.txt"))
include("**/*.java") property("name", "Sponge")
newLine(false) property("organization", organization)
property("url", projectUrl)
} }
val sourcesJar by tasks.existing val sourcesJar by tasks.existing
+8 -12
View File
@@ -35,21 +35,17 @@ tasks.withType(JavaCompile::class) {
dependencies { dependencies {
val tinyLogVersion: String by project val tinyLogVersion: String by project
implementation("com.squareup:javapoet:1.13.0") implementation("com.squareup:javapoet:1.13.0")
implementation("com.github.javaparser:javaparser-core:3.22.1") implementation("com.github.javaparser:javaparser-core:3.24.4")
implementation("org.tinylog:tinylog-api:$tinyLogVersion") implementation("org.tinylog:tinylog-api:$tinyLogVersion")
runtimeOnly("org.tinylog:tinylog-impl:$tinyLogVersion") runtimeOnly("org.tinylog:tinylog-impl:$tinyLogVersion")
} }
license { indraSpotlessLicenser {
properties { licenseHeaderFile(rootProject.file("HEADER.txt"))
this["name"] = "Sponge"
this["organization"] = organization
this["url"] = projectUrl
}
header(rootProject.file("HEADER.txt"))
include("**/*.java") property("name", "Sponge")
newLine(false) property("organization", organization)
property("url", projectUrl)
} }
val apiBase = rootProject.file("SpongeAPI/src/main/java/") val apiBase = rootProject.file("SpongeAPI/src/main/java/")
@@ -65,10 +61,10 @@ tasks.register("generateApiData", JavaExec::class) {
doFirst { doFirst {
// Write a template-expanded license header to the temporary file // Write a template-expanded license header to the temporary file
license.header.get().asReader().buffered().use { reader -> indraSpotlessLicenser.licenseHeaderFile().get().asReader().buffered().use { reader ->
val template = groovy.text.GStringTemplateEngine().createTemplate(reader) val template = groovy.text.GStringTemplateEngine().createTemplate(reader)
val propertyMap = (license as ExtensionAware).extra.properties.toMutableMap() val propertyMap = indraSpotlessLicenser.properties().get().toMutableMap()
propertyMap["name"] = "SpongeAPI" propertyMap["name"] = "SpongeAPI"
val out = template.make(propertyMap) val out = template.make(propertyMap)
+7 -7
View File
@@ -14,20 +14,20 @@ superClassChanges=common.superclasschange
minecraftVersion=1.16.5 minecraftVersion=1.16.5
recommendedVersion=0-SNAPSHOT recommendedVersion=0-SNAPSHOT
asmVersion=9.2 asmVersion=9.4
log4jVersion=2.17.1 log4jVersion=2.17.1
forgeAutoRenamingToolVersion=0.1.16 forgeAutoRenamingToolVersion=0.1.24
mixinVersion=0.8.4 mixinVersion=0.8.5
modlauncherVersion=8.1.3 modlauncherVersion=8.1.3
guavaVersion=21.0 guavaVersion=21.0
junitVersion=5.8.1 junitVersion=5.9.1
mockitoVersion=3.11.2 mockitoVersion=4.8.0
jlineVersion=3.21.0 jlineVersion=3.21.0
# If JLine is updated and it updates the jansi dep, remove the following # If JLine is updated and it updates the jansi dep, remove the following
# (and update the SV build.gradle) # (and update the SV build.gradle)
jansiVersion=2.4.0 jansiVersion=2.4.0
tinyLogVersion=2.3.2 tinyLogVersion=2.5.0
checkerVersion=3.19.0 checkerVersion=3.26.0
org.gradle.jvmargs=-Xss4m org.gradle.jvmargs=-Xss4m
org.gradle.parallel=true org.gradle.parallel=true
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
+9 -12
View File
@@ -11,22 +11,19 @@ eclipse {
val organization: String by project val organization: String by project
val projectUrl: String by project val projectUrl: String by project
license { indraSpotlessLicenser {
properties { licenseHeaderFile(rootProject.file("HEADER.txt"))
this["name"] = "Sponge"
this["organization"] = organization
this["url"] = projectUrl
}
header(rootProject.file("HEADER.txt"))
include("**/*.java") property("name", "Sponge")
newLine(false) property("organization", organization)
property("url", projectUrl)
} }
val log4jVersion: String by project
val modlauncherVersion: String by project
val apiConfigurateVersion: String by project val apiConfigurateVersion: String by project
val asmVersion: String by project val asmVersion: String by project
val checkerVersion: String by project
val log4jVersion: String by project
val modlauncherVersion: String by project
dependencies { dependencies {
// AccessWidener transformer // AccessWidener transformer
@@ -58,5 +55,5 @@ dependencies {
} }
// And finally, compile only annotations // And finally, compile only annotations
compileOnly("org.checkerframework:checker-qual:3.13.0") compileOnly("org.checkerframework:checker-qual:$checkerVersion")
} }
+3 -3
View File
@@ -10,11 +10,11 @@ pluginManagement {
plugins { plugins {
// Default plugin versions // Default plugin versions
id("org.spongepowered.gradle.vanilla") version "0.2.1-SNAPSHOT" id("org.spongepowered.gradle.vanilla") version "0.2.1-SNAPSHOT"
id("org.cadixdev.licenser") version "0.6.1"
id("com.github.johnrengelman.shadow") version "7.1.2" id("com.github.johnrengelman.shadow") version "7.1.2"
id("org.spongepowered.gradle.sponge.dev") version "2.0.2" id("org.spongepowered.gradle.sponge.dev") version "2.1.1"
id("net.kyori.indra.licenser.spotless") version "3.0.1"
id("implementation-structure") id("implementation-structure")
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.5" id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.6"
id("com.github.ben-manes.versions") version "0.42.0" id("com.github.ben-manes.versions") version "0.42.0"
} }
} }
+5 -9
View File
@@ -6,14 +6,10 @@ dependencies {
annotationProcessor(implementation("org.spongepowered:spongeapi:$apiVersion")!!) annotationProcessor(implementation("org.spongepowered:spongeapi:$apiVersion")!!)
} }
license { indraSpotlessLicenser {
properties { licenseHeaderFile(rootProject.file("HEADER.txt"))
this["name"] = "Sponge"
this["organization"] = organization
this["url"] = projectUrl
}
header(rootProject.file("HEADER.txt"))
include("**/*.java") property("name", "Sponge")
newLine(false) property("organization", organization)
property("url", projectUrl)
} }
+6 -10
View File
@@ -129,7 +129,7 @@ val mixinConfigs = spongeImpl.mixinConfigurations
minecraft { minecraft {
runs { runs {
// Full development environment // Full development environment
sequenceOf(8, 11, 16).forEach { sequenceOf(8, 11, 17).forEach {
server("runJava${it}Server") { server("runJava${it}Server") {
args("--nogui", "--launchTarget", "sponge_server_dev") args("--nogui", "--launchTarget", "sponge_server_dev")
targetVersion(it) targetVersion(it)
@@ -497,16 +497,12 @@ tasks {
} }
} }
license { indraSpotlessLicenser {
properties { licenseHeaderFile(rootProject.file("HEADER.txt"))
this["name"] = "Sponge"
this["organization"] = organization
this["url"] = projectUrl
}
header(rootProject.file("HEADER.txt"))
include("**/*.java") property("name", "Sponge")
newLine(false) property("organization", organization)
property("url", projectUrl)
} }
val shadowJar by tasks.existing val shadowJar by tasks.existing
@@ -22,10 +22,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
/*
* Credit: MinecraftForge
* Changes: Minor tweaks, fixed scroll limits able to hit negative
*/
package org.spongepowered.vanilla.client.gui.widget; package org.spongepowered.vanilla.client.gui.widget;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
@@ -43,6 +39,10 @@ import org.lwjgl.opengl.GL11;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
/**
* Credit: MinecraftForge
* Changes: Minor tweaks, fixed scroll limits able to hit negative
*/
public abstract class ScrollPanel extends AbstractContainerEventHandler implements Widget { public abstract class ScrollPanel extends AbstractContainerEventHandler implements Widget {
private final Minecraft client; private final Minecraft client;
@@ -93,7 +93,7 @@ public abstract class ScrollPanel extends AbstractContainerEventHandler implemen
} }
private void applyScrollLimits() { private void applyScrollLimits() {
int max = Math.max(0, this.getMaxScroll()); final int max = Math.max(0, this.getMaxScroll());
if (this.scrollDistance < 0.0F) { if (this.scrollDistance < 0.0F) {
this.scrollDistance = 0.0F; this.scrollDistance = 0.0F;