mirror of
https://github.com/bdnugget/IdleRSC.git
synced 2026-11-07 07:57:27 +00:00
build: use gradle version catalogs
This commit keeps all versions in one location, for reference throughout various build scripts. https://docs.gradle.org/current/userguide/platforms.html
This commit is contained in:
3 files changed
+14
-5
No files matched your search
+2
-3
@@ -2,8 +2,7 @@ plugins {
|
||||
// Facilitates Java compilation
|
||||
id 'java'
|
||||
// For formatting source-code
|
||||
// NOTE: This is the maximum version that will work with JDK 8.
|
||||
id 'com.diffplug.spotless' version '6.12.0'
|
||||
alias(libs.plugins.spotless)
|
||||
}
|
||||
|
||||
// Tasks not related to build are split out into their own gradle scripts
|
||||
@@ -21,7 +20,7 @@ dependencies {
|
||||
// Ensure gradle is aware of the patched_client.jar dependency
|
||||
implementation files('patched_client.jar')
|
||||
// Used to find/populate scripts
|
||||
implementation group: 'org.reflections', name: 'reflections', version: '0.10.2'
|
||||
implementation libs.reflections
|
||||
}
|
||||
|
||||
tasks.named('jar') {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[versions]
|
||||
spotless = '6.12.0' # maximum version that will work with JDK 8.
|
||||
google-java-format = '1.7' # maximum version that will work with JDK 8.
|
||||
reflections = '0.10.2'
|
||||
|
||||
[plugins]
|
||||
spotless = { id = 'com.diffplug.spotless', version.ref = 'spotless' }
|
||||
google-java-format = { id = 'com.google.googlejavaformat', version.ref = 'google-java-format' }
|
||||
|
||||
[libraries]
|
||||
reflections = { module = 'org.reflections:reflections', version.ref = 'reflections' }
|
||||
+1
-2
@@ -15,8 +15,7 @@ spotless {
|
||||
removeUnusedImports()
|
||||
// Follow the Google Java formatting guide
|
||||
// ref: https://google.github.io/styleguide/javaguide.html
|
||||
// NOTE: This is the maximum version that will work with JDK 8.
|
||||
googleJavaFormat('1.7')
|
||||
googleJavaFormat("${libs.versions.google.java.format.get()}")
|
||||
// Fix formatting of type annotations
|
||||
formatAnnotations()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user