Skip to content

Commit 2d35d75

Browse files
committed
Create jars in temp dir
1 parent 8d672ef commit 2d35d75

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/funcTest/kotlin/com/github/jengelman/gradle/plugins/shadow/PublishingTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,15 @@ class PublishingTest : BasePluginTest() {
214214
}
215215
}
216216

217-
private fun repoPath(path: String): Path {
218-
return remoteRepoPath.resolve(path).also {
217+
private fun repoPath(relative: String): Path {
218+
return remoteRepoPath.resolve(relative).also {
219219
check(it.exists()) { "Path not found: $it" }
220220
check(it.isRegularFile()) { "Path is not a regular file: $it" }
221221
}
222222
}
223223

224-
private fun repoJarPath(path: String): JarPath {
225-
return JarPath(remoteRepoPath.resolve(path))
224+
private fun repoJarPath(relative: String): JarPath {
225+
return JarPath(remoteRepoPath.resolve(relative))
226226
}
227227

228228
private fun publish(): BuildResult = run("publish")

src/funcTest/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/BaseTransformerTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ abstract class BaseTransformerTest : BasePluginTest() {
2323
return buildJar("two.jar", builder)
2424
}
2525

26-
inline fun buildJar(path: String, builder: JarBuilder.() -> Unit): Path {
27-
return JarBuilder(path(path)).apply(builder).write()
26+
inline fun buildJar(relative: String, builder: JarBuilder.() -> Unit): Path {
27+
return JarBuilder(path("temp/$relative")).apply(builder).write()
2828
}
2929

3030
protected companion object {

src/funcTest/kotlin/com/github/jengelman/gradle/plugins/shadow/util/AppendableMavenRepository.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AppendableMavenRepository(
2020
private val modules = mutableListOf<Module>()
2121

2222
init {
23-
root.createDirectories()
23+
root.resolve("temp").createDirectories()
2424
root.resolve("settings.gradle").createFile()
2525
.writeText("rootProject.name = '${root.name}'")
2626
projectBuildScript = root.resolve("build.gradle").createFile()
@@ -109,7 +109,7 @@ class AppendableMavenRepository(
109109

110110
fun buildJar(builder: JarBuilder.() -> Unit) {
111111
val jarName = coordinate.replace(":", "-") + ".jar"
112-
existingJar = JarBuilder(root.resolve(jarName)).apply(builder).write()
112+
existingJar = JarBuilder(root.resolve("temp/$jarName")).apply(builder).write()
113113
}
114114

115115
fun addDependency(groupId: String, artifactId: String, version: String, scope: String = "runtime") {

0 commit comments

Comments
 (0)