Skip to content

Commit

Permalink
fix artifacts publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
fscarponi committed Mar 5, 2024
1 parent 4ab008d commit 51261ec
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions plugin/src/test/kotlin/E2ETests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ class E2ETests {

System.getenv("GRADLE_VERSION")?.let {
Log.warn("patching project's gradle version to $it")
patchGradleVersion(it, projectDir)
projectDir.resolve("gradle/wrapper/gradle-wrapper.properties")
.copyTo(PKGS_TEST_DATA_OUTPUT_DIR.resolve("patched-gradle-wrapper.properties"), overwrite = true)
patchGradleVersion(it, projectDir)?.let {
it.copyTo(PKGS_TEST_DATA_OUTPUT_DIR.resolve("patched-gradle-wrapper.properties"), overwrite = true)
}
}

val testContext = buildIdeContext(projectDir)
Expand Down Expand Up @@ -152,9 +152,9 @@ class E2ETests {

}

private fun patchGradleVersion(gradleVersion: String, projectDir: Path) {
private fun patchGradleVersion(gradleVersion: String, projectDir: Path): Path? {
val gradleProperties = projectDir.resolve("gradle/wrapper/gradle-wrapper.properties")
if (!gradleProperties.isRegularFile()) return
if (!gradleProperties.isRegularFile()) return null
gradleProperties.writeLines(
gradleProperties.readLines()
.map { line ->
Expand All @@ -169,6 +169,7 @@ class E2ETests {
}
}
)
return gradleProperties
}
}

Expand Down

0 comments on commit 51261ec

Please sign in to comment.