File tree Expand file tree Collapse file tree 3 files changed +34
-11
lines changed
src/functionalTest/kotlin/git/semver/plugin/gradle Expand file tree Collapse file tree 3 files changed +34
-11
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ plugins {
33 `java- gradle- plugin`
44
55 // Apply the Kotlin JVM plugin to add support for Kotlin.
6- kotlin( " jvm " ) version " 1.9.10 "
7- id( " com.gradle .plugin- publish" ) version " 1.2.1 "
8- id( " com.github.jmongard. git- semver-plugin " ) version " 0.13.0 "
6+ alias(libs.plugins.kotlin.jvm)
7+ alias(libs.plugins .plugin. publish)
8+ alias(libs.plugins. git. semver)
99 id(" jacoco" )
1010}
1111
@@ -22,14 +22,13 @@ repositories {
2222}
2323
2424dependencies {
25- implementation(kotlin(" stdlib" ))
26- implementation(" org.eclipse.jgit:org.eclipse.jgit:7.1.0.202411261347-r" )
27- implementation(" org.eclipse.jgit:org.eclipse.jgit.gpg.bc:7.1.0.202411261347-r" )
28- implementation(" org.slf4j:slf4j-api:1.7.36" )
25+ implementation(libs.jgit.core)
26+ implementation(libs.jgit.gpg)
27+ implementation(libs.slf4j.api)
2928
30- testImplementation(kotlin( " test- junit5" ) )
31- testImplementation(" org .junit.jupiter:junit-jupiter- params" )
32- testImplementation(" org .assertj:assertj-core:3.27.2 " )
29+ testImplementation(libs. kotlin. test. junit5)
30+ testImplementation(libs .junit.jupiter. params)
31+ testImplementation(libs .assertj.core )
3332}
3433
3534gradlePlugin {
Original file line number Diff line number Diff line change 1+ [versions ]
2+ assertj = " 3.27.2"
3+ git-semver-plugin = " 0.13.0"
4+ jgit = " 7.3.0.202506031305-r"
5+ kotlin = " 1.9.10"
6+ plugin-publish = " 1.2.1"
7+ slf4j = " 1.7.36"
8+
9+ [plugins ]
10+ git-semver = { id = " com.github.jmongard.git-semver-plugin" , version.ref = " git-semver-plugin" }
11+ kotlin-jvm = { id = " org.jetbrains.kotlin.jvm" , version.ref = " kotlin" }
12+ plugin-publish = { id = " com.gradle.plugin-publish" , version.ref = " plugin-publish" }
13+
14+ [libraries ]
15+ assertj-core = { module = " org.assertj:assertj-core" , version.ref = " assertj" }
16+ jgit-core = { module = " org.eclipse.jgit:org.eclipse.jgit" , version.ref = " jgit" }
17+ jgit-gpg = { module = " org.eclipse.jgit:org.eclipse.jgit.gpg.bc" , version.ref = " jgit" }
18+ junit-jupiter-params = { module = " org.junit.jupiter:junit-jupiter-params" }
19+ kotlin-test-junit5 = { module = " org.jetbrains.kotlin:kotlin-test-junit5" }
20+ slf4j-api = { module = " org.slf4j:slf4j-api" , version.ref = " slf4j" }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import org.eclipse.jgit.api.Git
55import org.gradle.testkit.runner.BuildResult
66import org.gradle.testkit.runner.GradleRunner
77import org.junit.jupiter.api.Test
8+ import org.junit.jupiter.api.io.TempDir
89import org.junit.jupiter.params.ParameterizedTest
910import org.junit.jupiter.params.provider.Arguments
1011import org.junit.jupiter.params.provider.CsvSource
@@ -18,6 +19,9 @@ import java.io.File
1819class GitSemverPluginFunctionalTest {
1920
2021 companion object {
22+ @TempDir
23+ lateinit var tempDir: File
24+
2125 @JvmStatic
2226 fun gradleVersions (): List <Arguments > {
2327 return listOf (
@@ -125,7 +129,7 @@ class GitSemverPluginFunctionalTest {
125129 """ .trimIndent();
126130
127131 // Setup the test build
128- val projectDir = File (" build/functionalTest" )
132+ val projectDir = tempDir.resolve (" build/functionalTest" )
129133 projectDir.mkdirs()
130134 projectDir.resolve(" .gitignore" ).writeText(" .gradle" )
131135 projectDir.resolve(" settings.gradle" ).writeText(" include ':sub1'" )
You can’t perform that action at this time.
0 commit comments