Skip to content

Commit

Permalink
chore: bump project version to 0.6.10
Browse files Browse the repository at this point in the history
Updates:
- Bump AGP from 8.5.0 to 8
.5.2
- Fix duplicated files in META-INF and module-info

Signed-off-by: androidacy-user <[email protected]>
  • Loading branch information
androidacy-user committed Aug 14, 2024
1 parent 8443f45 commit f59c809
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

allprojects {
group = "com.github.Androidacy.LSParanoid"
version = "0.6.9"
version = "0.6.10"

plugins.withType(JavaPlugin::class.java) {
extensions.configure(JavaPluginExtension::class.java) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
agp = "8.5.0"
agp = "8.5.2"
kotlin = "2.0.0"

[plugins]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,27 @@

package org.lsposed.lsparanoid.processor.commons

import org.lsposed.lsparanoid.processor.logging.getLogger
import java.io.File
import java.util.jar.JarEntry
import java.util.jar.JarOutputStream
import java.util.zip.ZipException


internal fun JarOutputStream.createFile(name: String, data: ByteArray) {
val logger = getLogger()
try {
putNextEntry(JarEntry(name.replace(File.separatorChar, '/')))
write(data)
} catch (e: ZipException) {
// it's normal to have duplicated files in META-INF
if (!name.startsWith("META-INF")) throw e
if (!name.startsWith("META-INF") || !name.startsWith("module-info")) {
throw e
} else {
logger.info("Duplicated file: {}", name)
}
} finally {
closeEntry()
closeQuietly()
}
}

Expand All @@ -39,6 +46,6 @@ internal fun JarOutputStream.createDirectory(name: String) {
} catch (ignored: ZipException) {
// it's normal that the directory already exists
} finally {
closeEntry()
closeQuietly()
}
}

0 comments on commit f59c809

Please sign in to comment.