We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13eaa4d commit fd8544aCopy full SHA for fd8544a
src/main/java/kompile/testing/Compiler.kt
@@ -137,7 +137,9 @@ class Compiler(private val rootDir: File) {
137
138
private fun extractJarFromAar(url: URL): File {
139
val zipFile = ZipFile(url.path)
140
- val newFileName = url.path.replace(".aar", ".jar")
+ val newFileName = url.path
141
+ .substringAfterLast(File.separatorChar)
142
+ .replace(".aar", ".jar")
143
val jar = File(File(rootDir, "unzippedAar"), newFileName)
144
val sourceInputStream = zipFile.getInputStream(zipFile.getEntry("classes.jar"))
145
FileUtils.copyInputStreamToFile(sourceInputStream, jar)
0 commit comments