You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to fix it in the most simple way by using replace("\\", "/")
internal fun File.classesSequence(): Sequence<Pair<String, File>> {
val prefix = absolutePath
return walkTopDown()
.filter { it.extension == "class" }
.filterNot { "META-INF" in it.name }
.sortedBy { it.invariantSeparatorsPath }
.map { it.absolutePath.removePrefix(prefix).replace("\\", "/").removePrefix("/") to it }
}
It now generates a different exception Caused by: com.android.tools.r8.utils.AbortException: Type com.slack.keeper.sample.KeeperSampleTest is defined multiple times: C:\PJazyky\_Projekty_net\keeper\sample\build\intermediates\keeper\externalStagingAndroidTest\classes.jar:\com\slack\keeper\sample\KeeperSampleTest.class, C:\PJazyky\_Projekty_net\keeper\sample\build\intermediates\keeper\externalStagingAndroidTest\classes.jar:com/slack/keeper/sample/KeeperSampleTest.class
So there is still a somewhere else similar problem. I will try to find it.
The text was updated successfully, but these errors were encountered:
You just probably know better where is used file path, which can contain \ as a java classpath where must be /.
So far I found nothing else than File.classesSequence().
The problem is described here
https://issuetracker.google.com/issues/287505134
The issue is that class
build/intermediates/keeper/externalStaging/classes.jar
Is created by using
\
in the path instead of/
I found a possible source of this issue, it is here
https://github.com/slackhq/keeper/blob/main/keeper-gradle-plugin/src/main/java/com/slack/keeper/ZipFlingerExt.kt#L33
It uses
absolutePath
to generate full qualified class name which is then used for adding files to the output jarOn Windows it produces
which is not correct.
I tried to fix it in the most simple way by using
replace("\\", "/")
It now generates a different exception
Caused by: com.android.tools.r8.utils.AbortException: Type com.slack.keeper.sample.KeeperSampleTest is defined multiple times: C:\PJazyky\_Projekty_net\keeper\sample\build\intermediates\keeper\externalStagingAndroidTest\classes.jar:\com\slack\keeper\sample\KeeperSampleTest.class, C:\PJazyky\_Projekty_net\keeper\sample\build\intermediates\keeper\externalStagingAndroidTest\classes.jar:com/slack/keeper/sample/KeeperSampleTest.class
So there is still a somewhere else similar problem. I will try to find it.
The text was updated successfully, but these errors were encountered: