Skip to content

Commit

Permalink
Add Gson dependency and module requirement
Browse files Browse the repository at this point in the history
* Add `requires com.google.gson` to `module-info.java`
* Add Gson library entry to `libs.versions.toml`
* Add Gson dependency to `dependencies` section in `build.gradle`
  • Loading branch information
gabizou committed Dec 12, 2024
1 parent 119fe9c commit ef4266c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion annotations/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
// This way we can still use the internal package, but not
// to external developers.
exports org.spongepowered.eventgen.annotations.internal to org.spongepowered.eventimplgen;
}

requires com.google.gson;
}
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ dependencies {

compileOnlyApi libs.jetbrainsAnnotations

api(libs.gson)

// Tests
testImplementation libs.assertj
testImplementation libs.joor
Expand All @@ -119,4 +121,4 @@ dependencies {
testImplementation libs.junit.params
testRuntimeOnly libs.junit.engine
testRuntimeOnly libs.junit.launcher
}
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ checkerQual = "3.26.0"
dagger = "2.52"
errorprone = "2.28.0"
junit = "5.10.2"
gson = "2.8.8"

[libraries]
autoService-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService" }
Expand All @@ -19,6 +20,7 @@ javapoet = { module = "io.soabase.java-composer:java-composer", version = "1.0"
jetbrainsAnnotations = { module = "org.jetbrains:annotations", version = "24.1.0"}
jakartaInject = { module = "jakarta.inject:jakarta.inject-api", version = "2.0.1" }
javaxInject = { module = "javax.inject:javax.inject", version = "1" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }

# Tests
assertj = { module = "org.assertj:assertj-core", version = "3.26.0" }
Expand Down

0 comments on commit ef4266c

Please sign in to comment.