Skip to content

Commit f2a844e

Browse files
committed
feat(abg): clean up temporary files after jar creation
1 parent 123e11e commit f2a844e

File tree

1 file changed

+3
-0
lines changed
  • maven-binding-builder/src/main/kotlin/io/github/typesafegithub/workflows/mavenbinding

1 file changed

+3
-0
lines changed

maven-binding-builder/src/main/kotlin/io/github/typesafegithub/workflows/mavenbinding/JarBuilding.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,16 @@ internal fun ActionCoords.buildJars(types: String?): Jars? {
3737
val pathWithJarContents = compileBinding(sourceFilePaths = sourceFilePaths)
3838
val mainJarByteArrayOutputStream = ByteArrayOutputStream()
3939
mainJarByteArrayOutputStream.createZipFile(pathWithJarContents)
40+
pathWithJarContents.toFile().deleteRecursively()
41+
compilationInputDir.toFile().deleteRecursively()
4042
mainJarByteArrayOutputStream.toByteArray()
4143
}
4244

4345
val sourcesJar by lazy {
4446
val (_, compilationInputDir) = binding.prepareDirectoryWithSources()
4547
val sourcesJarByteArrayOutputStream = ByteArrayOutputStream()
4648
sourcesJarByteArrayOutputStream.createZipFile(compilationInputDir)
49+
compilationInputDir.toFile().deleteRecursively()
4750
sourcesJarByteArrayOutputStream.toByteArray()
4851
}
4952

0 commit comments

Comments
 (0)