Improve compatibility with boot.oat in recent A15
See JingMatrix/LSPosed#414 for details Also update few dependencies. Co-Authored-By: JingMatrix <jingmatrix@gmail.com>
This commit is contained in:
parent
a89856c4b4
commit
5642d2e62f
|
|
@ -5,6 +5,7 @@ import org.eclipse.jgit.api.Git
|
|||
import org.eclipse.jgit.internal.storage.file.FileRepository
|
||||
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
|
||||
import com.android.build.gradle.LibraryExtension
|
||||
import org.gradle.kotlin.dsl.extra
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.agp.lib) apply false
|
||||
|
|
@ -66,8 +67,8 @@ tasks.register<Delete>("clean") {
|
|||
listOf("Debug", "Release").forEach { variant ->
|
||||
tasks.register("build$variant") {
|
||||
description = "Build NPatch with $variant"
|
||||
dependsOn(projects.jar.dependencyProject.tasks["build$variant"])
|
||||
dependsOn(projects.manager.dependencyProject.tasks["build$variant"])
|
||||
dependsOn(tasks.findByPath(":jar:build$variant") ?: "jar:build$variant")
|
||||
dependsOn(tasks.findByPath(":manager:build$variant") ?: "manager:build$variant")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -105,7 +106,8 @@ fun Project.configureBaseExtension() {
|
|||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments += "-DEXTERNAL_ROOT=${File(rootDir.absolutePath, "core/external")}"
|
||||
arguments += "-DCORE_ROOT=${File(rootDir.absolutePath, "core/core/src/main/jni")}"
|
||||
arguments += "-DCORE_ROOT=${File(rootDir.absolutePath,
|
||||
"core/core/src/main/jni")}"
|
||||
abiFilters("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
|
||||
val flags = arrayOf(
|
||||
"-Wall",
|
||||
|
|
@ -165,7 +167,7 @@ fun Project.configureBaseExtension() {
|
|||
"-fno-asynchronous-unwind-tables",
|
||||
"-flto=thin",
|
||||
"-Wl,--thinlto-cache-policy,cache_size_bytes=300m",
|
||||
"-Wl,--thinlto-cache-dir=${buildDir.absolutePath}/.lto-cache",
|
||||
"-Wl,--thinlto-cache-dir=${layout.buildDirectory.get().asFile.absolutePath}/.lto-cache",
|
||||
)
|
||||
cppFlags.addAll(flags)
|
||||
cFlags.addAll(flags)
|
||||
|
|
@ -179,7 +181,7 @@ fun Project.configureBaseExtension() {
|
|||
"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=$configFlags",
|
||||
"-DCMAKE_C_FLAGS_RELEASE=$configFlags",
|
||||
"-DCMAKE_C_FLAGS_RELWITHDEBINFO=$configFlags",
|
||||
"-DDEBUG_SYMBOLS_PATH=${buildDir.absolutePath}/symbols",
|
||||
"-DDEBUG_SYMBOLS_PATH=${layout.buildDirectory.get().asFile.absolutePath}/symbols",
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
@ -253,4 +255,4 @@ project(":core") {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
core
2
core
|
|
@ -1 +1 @@
|
|||
Subproject commit 92ea824eb669c4cc4f82f701b8896447c4d2c785
|
||||
Subproject commit 290818e2660f6295fd4913c46e0703d91644ce21
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
[versions]
|
||||
room = "2.7.2"
|
||||
room = "2.8.3"
|
||||
accompanist = "0.36.0"
|
||||
compose-destinations = "1.11.7"
|
||||
shizuku = "13.1.5"
|
||||
hiddenapi = "4.4.0"
|
||||
compose-bom = "2025.08.00"
|
||||
kotlin = "2.2.10"
|
||||
ksp = "2.2.10-2.0.2"
|
||||
compose-bom = "2025.11.00"
|
||||
kotlin = "2.2.21"
|
||||
ksp = "2.3.2"
|
||||
commons-io = "2.20.0"
|
||||
beust-jcommander = "1.82"
|
||||
google-gson = "2.13.1"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<string name="home_system_abi">系统架构</string>
|
||||
<string name="home_info_copied">已复制到剪贴板</string>
|
||||
<string name="home_support">支持</string>
|
||||
<string name="home_description">NPatch 是一款免费的复刻于 LSPatch 的,基于 LSPosed 核心的免 Root 的 Xposed 框架。</string>
|
||||
<string name="home_description">NPatch 是一款免费且迭代于 LSPatch 的,基于 LSPosed 核心的免 Root 的 Xposed 框架。</string>
|
||||
<string name="home_view_source_code"><![CDATA[查看源代码 %1$s<br/>加入我们的 %2$s 频道]]></string>
|
||||
<!-- Manage Screen -->
|
||||
<string name="screen_manage">管理</string>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<string name="home_system_abi">系統架構</string>
|
||||
<string name="home_info_copied">已複製到剪貼簿</string>
|
||||
<string name="home_support">支援</string>
|
||||
<string name="home_description">NPatch 是一款免費且 Fork 自 LSPatch 的,基於 LSPosed 核心的免 Root 的 Xposed 框架。</string>
|
||||
<string name="home_description">NPatch 是一款免費且迭代自 LSPatch 的,基於 LSPosed 核心的免 Root 的 Xposed 框架。</string>
|
||||
<string name="home_view_source_code"><![CDATA[查看原始碼 %1$s<br/>加入我們的 %2$s 頻道]]></string>
|
||||
<!-- Manage Screen -->
|
||||
<string name="screen_manage">管理</string>
|
||||
|
|
|
|||
|
|
@ -31,29 +31,29 @@ android {
|
|||
androidComponents.onVariants { variant ->
|
||||
val variantCapped = variant.name.replaceFirstChar { it.uppercase() }
|
||||
|
||||
task<Copy>("copyDex$variantCapped") {
|
||||
val copyDexTask = tasks.register<Copy>("copyDex$variantCapped") {
|
||||
dependsOn("assemble$variantCapped")
|
||||
from("$buildDir/intermediates/dex/${variant.name}/mergeDex$variantCapped/classes.dex")
|
||||
from(layout.buildDirectory.file("intermediates/dex/${variant.name}/mergeDex$variantCapped/classes.dex"))
|
||||
rename("classes.dex", "loader.dex")
|
||||
into("${rootProject.projectDir}/out/assets/${variant.name}/lspatch")
|
||||
}
|
||||
|
||||
task<Copy>("copySo$variantCapped") {
|
||||
val copySoTask = tasks.register<Copy>("copySo$variantCapped") {
|
||||
dependsOn("assemble$variantCapped")
|
||||
dependsOn("strip${variantCapped}DebugSymbols")
|
||||
val libDir = variant.name + "/strip${variantCapped}DebugSymbols"
|
||||
from(
|
||||
fileTree(
|
||||
"dir" to "$buildDir/intermediates/stripped_native_libs/${variant.name}/strip${variantCapped}DebugSymbols/out/lib",
|
||||
"dir" to layout.buildDirectory.dir("intermediates/stripped_native_libs/${variant.name}/strip${variantCapped}DebugSymbols/out/lib"),
|
||||
"include" to listOf("**/liblspatch.so")
|
||||
)
|
||||
)
|
||||
into("${rootProject.projectDir}/out/assets/${variant.name}/lspatch/so")
|
||||
}
|
||||
|
||||
task("copy$variantCapped") {
|
||||
dependsOn("copySo$variantCapped")
|
||||
dependsOn("copyDex$variantCapped")
|
||||
tasks.register("copy$variantCapped") {
|
||||
dependsOn(copySoTask)
|
||||
dependsOn(copyDexTask)
|
||||
|
||||
doLast {
|
||||
println("Dex and so files has been copied to ${rootProject.projectDir}${File.separator}out")
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ dependencyResolutionManagement {
|
|||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url = uri("https://www.jitpack.io") }
|
||||
mavenLocal {
|
||||
content {
|
||||
includeGroup("io.github.libxposed")
|
||||
|
|
|
|||
Loading…
Reference in New Issue