Skip to content

Commit

Permalink
Use version catalog (#36)
Browse files Browse the repository at this point in the history
* add catalog toml file

* change declaration for matching catalog definition

* fix dependabot configuration for pointing new toml file
  • Loading branch information
hizumiaoba authored Apr 19, 2024
1 parent 1eb355e commit 3fac827
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
directory: "/gradle/" # Location of package manifests
schedule:
interval: "weekly"
32 changes: 15 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
plugins {
java
application
id("org.beryx.jlink") version "3.0.1"
id("org.openjfx.javafxplugin") version "0.1.0"
id("org.javamodularity.moduleplugin") version "1.8.15"
alias(libs.plugins.jlink)
alias(libs.plugins.moduleplugin)
alias(libs.plugins.shadow)
alias(libs.plugins.javafxpugin)
id("org.jetbrains.kotlin.jvm")
id("com.github.johnrengelman.shadow") version "8.1.1"
}

group = "io.github.hizumiaoba"
Expand Down Expand Up @@ -40,28 +40,26 @@ javafx {
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation(libs.kotlin.stdlib)

implementation("ch.qos.logback:logback-classic:1.5.5")
implementation("com.google.guava:guava:33.1.0-jre")
implementation(libs.logback)
implementation(libs.guava)
// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
implementation("org.xerial:sqlite-jdbc:3.45.2.0")
implementation("org.projectlombok:lombok:${lombokVersion}")
implementation(libs.sqlite.jdbc)
implementation(libs.lombok)
// https://mvnrepository.com/artifact/jakarta.annotation/jakarta.annotation-api
implementation("jakarta.annotation:jakarta.annotation-api:${jakartaVersion}")
implementation(libs.jakarta.annotation)
// https://mvnrepository.com/artifact/com.melloware/jintellitype
implementation("com.melloware:jintellitype:1.4.1")
implementation(libs.jintelitype)


// test dependencies
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
testImplementation("com.google.truth:truth:1.4.2")
testImplementation(libs.bundles.testlibs)
testRuntimeOnly(libs.jupiter.engine)

// annotation processor
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")
testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}")
annotationProcessor("jakarta.annotation:jakarta.annotation-api:${jakartaVersion}")
annotationProcessor(libs.bundles.annotationProcess)
testAnnotationProcessor(libs.lombok)
}

tasks.shadowJar {
Expand Down
28 changes: 28 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[versions]
junit = "5.10.1"
lombok = "1.18.30"
jakarta = "2.1.1"

[libraries]
logback = { group = "ch.qos.logback", name = "logback-classic", version = "1.5.5" }
guava = { group = "com.google.guava", name = "guava", version = "33.1.0-jre" }
sqlite-jdbc = { group = "org.xerial", name = "sqlite-jdbc", version = "3.45.2.0" }
lombok = { group = "org.projectlombok", name = "lombok", version.ref = "lombok" }
jakarta-annotation = { group = "jakarta.annotation", name = "jakarta.annotation-api", version.ref = "jakarta" }
jintelitype = { group = "com.melloware", name = "jintellitype", version = "1.4.1" }
jupiter-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit" }
jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit" }
truth = { group = "com.google.truth", name = "truth", version = "1.4.2" }
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version = "1.8.22" }

[bundles]
# except for engine dependency, which is only needed for running tests
testlibs = ["jupiter-api", "truth"]
# convenience bundle for annotationProcessor
annotationProcess = ["lombok", "jakarta-annotation"]

[plugins]
jlink = { id = "org.beryx.jlink", version = "3.0.1" }
javafxpugin = { id = "org.openjfx.javafxplugin", version = "0.1.0" }
moduleplugin = { id = "org.javamodularity.moduleplugin", version = "1.8.15" }
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }

0 comments on commit 3fac827

Please sign in to comment.