switch to lys-catalog

This commit is contained in:
2022-08-28 13:05:02 +08:00
parent d6ba855001
commit e3c1dfca5e
11 changed files with 59 additions and 48 deletions

View File

@@ -5,14 +5,13 @@ plugins {
dependencies { dependencies {
implementation rootProject implementation rootProject
testImplementation group: "net.woggioni", name: "jwo" testImplementation catalog.jwo
testImplementation project(':test-utils') testImplementation project(':test-utils')
testImplementation group: "com.fasterxml.jackson.core", name: "jackson-databind" testImplementation catalog.jackson.databind
testImplementation group: "org.tukaani", name: "xz" testImplementation catalog.xz
antlr platform(group: 'com.lys', name: 'lys-dependencies', version: getProperty('lys.version')) antlr catalog.antlr
antlr group: "org.antlr", name: "antlr4" antlr catalog.antlr.runtime
antlr group: "org.antlr", name: "antlr4-runtime"
} }
generateGrammarSource { generateGrammarSource {

View File

@@ -14,10 +14,11 @@ run {
dependencies { dependencies {
implementation rootProject implementation rootProject
implementation project(':antlr') implementation project(':antlr')
implementation group: "net.woggioni", name: "jwo"
implementation group: 'org.tukaani', name: 'xz' implementation catalog.jwo
implementation group: 'com.beust', name: 'jcommander' implementation catalog.xz
implementation group: "com.fasterxml.jackson.core", name: "jackson-databind" implementation catalog.jcommander
implementation catalog.jackson.databind
runtimeOnly project(':test-utils') runtimeOnly project(':test-utils')
} }

View File

@@ -1,18 +1,18 @@
plugins { plugins {
id 'maven-publish' id 'maven-publish'
id 'net.woggioni.gradle.lombok' apply false alias catalog.plugins.lombok apply false
id 'net.woggioni.gradle.multi-release-jar' alias catalog.plugins.multi.release.jar
} }
allprojects { allprojects {
apply plugin: 'java-library' apply plugin: 'java-library'
apply plugin: 'net.woggioni.gradle.lombok' apply plugin: catalog.plugins.lombok.get().pluginId
group = "net.woggioni" group = "net.woggioni"
version = getProperty('wson.version') version = getProperty('wson.version')
lombok { lombok {
version = getProperty('lombok.version') version = catalog.versions.lombok.get()
} }
repositories { repositories {
@@ -28,12 +28,11 @@ allprojects {
} }
dependencies { dependencies {
implementation platform(group: 'com.lys', name: 'lys-dependencies', version: getProperty('lys.version')) implementation catalog.xz
implementation group: "org.tukaani", name: "xz"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api' testImplementation catalog.junit.jupiter.api
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params' testImplementation catalog.junit.jupiter.params
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine' testRuntimeOnly catalog.junit.jupiter.engine
} }
test { test {
@@ -50,11 +49,11 @@ ext {
} }
dependencies { dependencies {
implementation group: "net.woggioni", name: "jwo" implementation catalog.jwo
implementation group: "org.slf4j", name: "slf4j-api" implementation catalog.slf4j.api
testImplementation project('test-utils') testImplementation project('test-utils')
testImplementation group: "com.fasterxml.jackson.core", name: "jackson-databind" testImplementation catalog.jackson.databind
} }
java { java {

View File

@@ -1,10 +1,5 @@
gradle.version=7.4.2 gradle.version=7.5.1
wson.version = 1.0-SNAPSHOT wson.version = 1.0-SNAPSHOT
lys-gradle-plugins.version = 2022.06
lys.version = 0.1-SNAPSHOT lys.version = 0.1-SNAPSHOT
lombok.version = 1.18.22
kotlin.version = 1.7.0

Binary file not shown.

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.4.2-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

6
gradlew vendored
View File

@@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \ org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args. # Use "xargs" to parse quoted args.
# #
# With -n1 it outputs one arg per line, with the quotes and backslashes removed. # With -n1 it outputs one arg per line, with the quotes and backslashes removed.

10
gradlew.bat vendored
View File

@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -11,12 +11,21 @@ pluginManagement {
} }
gradlePluginPortal() gradlePluginPortal()
} }
}
plugins { dependencyResolutionManagement {
id 'net.woggioni.gradle.envelope' version getProperty('lys-gradle-plugins.version') repositories {
id 'net.woggioni.gradle.lombok' version getProperty('lys-gradle-plugins.version') maven {
id 'net.woggioni.gradle.multi-release-jar' version getProperty('lys-gradle-plugins.version') url = 'https://woggioni.net/mvn/'
id 'org.jetbrains.kotlin.jvm' version getProperty('kotlin.version') content {
includeGroup 'com.lys'
}
}
}
versionCatalogs {
catalog {
from group: 'com.lys', name: 'lys-catalog', version: getProperty('lys.version')
}
} }
} }

View File

@@ -1,8 +1,8 @@
plugins { plugins {
id 'maven-publish' id 'maven-publish'
id 'net.woggioni.gradle.envelope' alias catalog.plugins.envelope
id 'org.jetbrains.kotlin.jvm' alias catalog.plugins.kotlin
id 'net.woggioni.gradle.multi-release-jar' alias catalog.plugins.multi.release.jar
} }
ext { ext {
@@ -10,9 +10,9 @@ ext {
} }
dependencies { dependencies {
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: getProperty('kotlin.version') implementation catalog.kotlin.stdlib.jdk8
implementation group: 'com.beust', name: 'jcommander' implementation catalog.jcommander
implementation group: "org.slf4j", name: "slf4j-simple" implementation catalog.slf4j.simple
implementation rootProject implementation rootProject
} }

View File

@@ -4,6 +4,6 @@ plugins {
dependencies { dependencies {
implementation rootProject implementation rootProject
implementation group: 'jakarta.json', name: 'jakarta.json-api', version: '2.1.0' implementation catalog.jakarta.json.api
implementation group: "net.woggioni", name: "jwo" implementation catalog.jwo
} }