File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/main/java/org/python/testbed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,12 @@ androidComponents.onVariants { variant ->
229229 from(cwd)
230230 }
231231 }
232+
233+ // A filename ending with .gz will be automatically decompressed
234+ // while building the APK. Avoid this by adding a dash to the end,
235+ // and add an extra dash to any filenames that already end with one.
236+ // This will be undone in MainActivity.kt.
237+ rename(""" .*(\.gz|-)""" , " $0-" )
232238 }
233239 }
234240
Original file line number Diff line number Diff line change @@ -80,7 +80,9 @@ class PythonTestRunner(val context: Context) {
8080 continue
8181 }
8282 input.use {
83- File (targetSubdir, name).outputStream().use { output ->
83+ // Undo the .gz workaround from build.gradle.kts.
84+ val outputName = name.replace(Regex (""" (.*)-""" ), " $1" )
85+ File (targetSubdir, outputName).outputStream().use { output ->
8486 input.copyTo(output)
8587 }
8688 }
You can’t perform that action at this time.
0 commit comments