Template
mirror of
https://github.com/MorpheApp/morphe-patches-template.git
synced 2026-12-01 00:19:34 +00:00
chore: Generate patch metadata from the current bundle (#97)
This commit is contained in:
1 parent
104bfedfcb
commit
50f717d6f9
2 files changed
+13
-23
No files matched your search
@@ -44,6 +44,8 @@ animalsniffer {
|
||||
}
|
||||
|
||||
tasks {
|
||||
val patchesFile = jar.flatMap { it.archiveFile }
|
||||
|
||||
register<JavaExec>("generatePatchesList") {
|
||||
description = "Build patch with patch list"
|
||||
|
||||
@@ -51,13 +53,15 @@ tasks {
|
||||
|
||||
classpath = sourceSets["main"].runtimeClasspath + patchListGeneratorClasspath
|
||||
mainClass.set("util.PatchListGeneratorKt")
|
||||
argumentProviders.add(CommandLineArgumentProvider {
|
||||
listOf(patchesFile.get().asFile.absolutePath)
|
||||
})
|
||||
}
|
||||
|
||||
// Runs D8 on every class in the patches file (the patches and all bundled dependencies)
|
||||
// but outputs class files instead of dex, so the check sees the code as it runs on Android,
|
||||
// after D8 has replaced methods it backports such as List.of() and Optional.isEmpty().
|
||||
val desugarPatchesClasses = register("desugarPatchesClasses") {
|
||||
val patchesFile = jar.flatMap { it.archiveFile }
|
||||
val classpath = sourceSets["main"].compileClasspath
|
||||
val output = layout.buildDirectory.file("animalsniffer/patches-desugared.jar")
|
||||
|
||||
|
||||
Reference in new issue
Block a user