Skip to content

Commit

Permalink
build refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Feb 3, 2025
1 parent 8e51212 commit 9336dc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
15 changes: 2 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,17 @@ repositories {
mavenCentral()
}

final String gsonVersion = "2.12.0"
final String junitVersion = "5.11.4"
final String jmhVersion = "1.37"
final String bcVersion = "1.80"

final String minRuntimeGson = "2.1" // allow later versions at runtime
final String requires = "[$minRuntimeGson, $gsonVersion]" // cap the require at the preferred version

dependencies {
implementation("com.google.code.gson:gson:" + gsonVersion) {
implementation("com.google.code.gson:gson:") {
version {
require(requires) // published in "dependencies"
require("[2.1, 2.12.0]") // published in "dependencies"
}
exclude(group: "com.google.errorprone", module: "error_prone_annotations")
}
constraints {
implementation("com.google.code.gson:gson:") {
version {
require("[$minRuntimeGson") // published in "dependencyConstraints" / "<dependencyManagement>"
}
}
}

testImplementation("org.junit.jupiter:junit-jupiter-api:" + junitVersion)
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:" + junitVersion)
Expand Down
15 changes: 2 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,16 @@
// mavenCentral()
//}
//
//val gsonVersion = "2.12.0"
//val junitVersion = "5.11.4"
//val bcVersion = "1.80"
//
//val minRuntimeGson = "2.1" // allow later versions at runtime
//val requires = "[$minRuntimeGson, $gsonVersion]" // cap the require at the preferred version
//
//dependencies {
// implementation("com.google.code.gson:gson:$gsonVersion") {
// implementation("com.google.code.gson:gson:") {
// version {
// require(requires) // published in "dependencies"
// require("[2.1, 2.12.0]") // published in "dependencies"
// }
// exclude(group = "com.google.errorprone", module = "error_prone_annotations")
// }
// constraints {
// implementation("com.google.code.gson:gson:") {
// version {
// require("[$minRuntimeGson") // published in "dependencyConstraints" / "<dependencyManagement>"
// }
// }
// }
//
// testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
// testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
Expand Down

0 comments on commit 9336dc6

Please sign in to comment.