Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #61: Use version catalog to specify project and build dependencies #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import org.gosulang.gradle.build.VersionWriterTask
import java.nio.charset.StandardCharsets

plugins {
id 'com.gradle.plugin-publish' version "${gradlePublishPluginVersion}"
id 'net.researchgate.release' version "${researchgateReleaseGradlePluginVersion}"
alias(libs.plugins.plugin.publish)
alias(libs.plugins.release)
alias(libs.plugins.reproducible.builds)
id 'groovy'
id 'java-gradle-plugin'
id 'maven-publish'
Expand Down Expand Up @@ -40,14 +41,18 @@ repositories {
}

dependencies {
testImplementation platform("org.junit:junit-bom:${junitPlatformVersion}")
testImplementation "org.junit.jupiter:junit-jupiter"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine"
testImplementation "junit:junit:${junitVersion}" //TODO refactor existing unit tests and get rid of junit 4
testImplementation "org.hamcrest:hamcrest-library:${hamcrestLibraryVersion}"
testImplementation "org.spockframework:spock-core:${spockCoreVersion}"
testImplementation "org.assertj:assertj-core:${assertjCoreVersion}"
testImplementation "org.opentest4j:opentest4j:${opentest4jVersion}"
testImplementation platform(libs.junit.platform)
testImplementation libs.junit.jupiter
testRuntimeOnly libs.junit.vintageEngine
testImplementation libs.junit4
testImplementation libs.hamcrest
testImplementation(libs.spock.core) {
artifact {
type = "jar"
}
}
testImplementation libs.assertj
testImplementation libs.opentest4j
}

java {
Expand Down
14 changes: 1 addition & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,5 @@ org.gradle.workers.max=1
gosuVersion=1.17.8
testedVersions=8.2,8.10.1

# Gradle plugins
gradlePublishPluginVersion=0.15.0
researchgateReleaseGradlePluginVersion=3.0.2

# For docker container
javaVersion=11

# Test implementation dependencies
assertjCoreVersion=3.24.2
hamcrestLibraryVersion=2.2
spockCoreVersion=2.3-groovy-3.0@jar
junitVersion=4.13.2
junitPlatformVersion=5.8.2
opentest4jVersion=1.3.0
javaVersion=11
14 changes: 14 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[libraries]
junit-platform = { module = "org.junit:junit-bom", version = "5.8.2" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" } # version inherited from junit-bom
junit-vintageEngine = { module = "org.junit.vintage:junit-vintage-engine" } # version inherited from junit-bom
junit4 = { module = "junit:junit", version = "4.13.2" }
hamcrest = { module = "org.hamcrest:hamcrest-library", version = "2.2" }
spock-core = { module = "org.spockframework:spock-core", version = "2.3-groovy-3.0" }
assertj = { module = "org.assertj:assertj-core", version = "3.24.2" }
opentest4j = { module = "org.opentest4j:opentest4j", version = "1.3.0" }

[plugins]
plugin-publish = { id = "com.gradle.plugin-publish", version = "0.15.0" }
release = { id = "net.researchgate.release", version = "3.0.2" }
reproducible-builds = { id = "org.gradlex.reproducible-builds", version = "1.0" }