Centralize dependencies and migrate to submodules (#512)
Centralize dependencies and migrate to submodules Move `apache` and `axml` modules to a unified `external` directory and migrate libxposed API and service interfaces from Maven dependencies to Git submodules. Included changes: - Updated .gitmodules with new paths. - Simplified core.yml CI workflow. - Updated Gradle project references to use the new directory structure. - Added documentation for external components.
This commit is contained in:
parent
e893bb0f28
commit
211bd5f115
|
|
@ -40,19 +40,6 @@ jobs:
|
|||
echo ${{ secrets.KEY_STORE }} | base64 --decode > key.jks
|
||||
fi
|
||||
|
||||
- name: Checkout libxposed/api
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: libxposed/api
|
||||
path: libxposed/api
|
||||
ref: 54582730315ba4a3d7cfaf9baf9d23c419e07006
|
||||
|
||||
- name: Checkout libxposed/service
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: libxposed/service
|
||||
path: libxposed/service
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
|
|
@ -84,18 +71,6 @@ jobs:
|
|||
shell: bash
|
||||
run: rm -rf $ANDROID_HOME/cmake
|
||||
|
||||
- name: Build dependencies
|
||||
working-directory: libxposed
|
||||
run: |
|
||||
echo 'org.gradle.caching=true' >> ~/.gradle/gradle.properties
|
||||
echo 'org.gradle.parallel=true' >> ~/.gradle/gradle.properties
|
||||
echo 'org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -XX:+UseParallelGC' >> ~/.gradle/gradle.properties
|
||||
echo 'android.native.buildOutput=verbose' >> ~/.gradle/gradle.properties
|
||||
cd api
|
||||
./gradlew publishToMavenLocal
|
||||
cd ../service
|
||||
./gradlew publishToMavenLocal
|
||||
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
./gradlew zipAll
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
apache/local/generated
|
||||
.project
|
||||
.settings
|
||||
.cache
|
||||
|
|
@ -7,6 +6,6 @@ apache/local/generated
|
|||
/local.properties
|
||||
/.idea
|
||||
.DS_Store
|
||||
/build
|
||||
build
|
||||
/captures
|
||||
bin/
|
||||
|
|
|
|||
|
|
@ -7,15 +7,21 @@
|
|||
[submodule "external/fmt"]
|
||||
path = external/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
[submodule "patch/libs/manifest-editor"]
|
||||
path = axml/libs/manifest-editor
|
||||
url = https://github.com/JingMatrix/ManifestEditor.git
|
||||
[submodule "external/xz-embedded"]
|
||||
path = external/xz-embedded
|
||||
url = https://github.com/tukaani-project/xz-embedded
|
||||
[submodule "apache/commons-lang"]
|
||||
path = apache/commons-lang
|
||||
url = https://github.com/apache/commons-lang
|
||||
url = https://github.com/tukaani-project/xz-embedded.git
|
||||
[submodule "external/lsplt"]
|
||||
path = external/lsplt
|
||||
url = https://github.com/JingMatrix/LSPlt
|
||||
[submodule "services/libxposed"]
|
||||
path = services/libxposed
|
||||
url = https://github.com/libxposed/service.git
|
||||
[submodule "xposed/libxposed"]
|
||||
path = xposed/libxposed
|
||||
url = https://github.com/libxposed/api.git
|
||||
[submodule "external/apache/commons-lang"]
|
||||
path = external/apache/commons-lang
|
||||
url = https://github.com/apache/commons-lang.git
|
||||
[submodule "external/axml/manifest-editor"]
|
||||
path = external/axml/manifest-editor
|
||||
url = https://github.com/JingMatrix/ManifestEditor.git
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 623235ebca46bea1a6e8cc02b7d7084c1698ab80
|
||||
|
|
@ -1 +0,0 @@
|
|||
/build
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit c40dc842a3e3ec23ec77b08d638671af0d9062d3
|
||||
|
|
@ -56,13 +56,12 @@ copy {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.libxposed.api)
|
||||
implementation(projects.apache)
|
||||
implementation(projects.axml)
|
||||
api(projects.xposed)
|
||||
implementation(projects.external.apache)
|
||||
implementation(projects.external.axml)
|
||||
implementation(projects.hiddenapi.bridge)
|
||||
implementation(projects.services.daemonService)
|
||||
implementation(projects.services.managerService)
|
||||
implementation(projects.xposed)
|
||||
compileOnly(libs.androidx.annotation)
|
||||
compileOnly(projects.hiddenapi.stubs)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,9 +114,8 @@ android.applicationVariants.all {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.libxposed.`interface`)
|
||||
implementation(libs.agp.apksig)
|
||||
implementation(projects.apache)
|
||||
implementation(projects.external.apache)
|
||||
implementation(projects.hiddenapi.bridge)
|
||||
implementation(projects.services.daemonService)
|
||||
implementation(projects.services.managerService)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(external)
|
||||
|
||||
macro(SET_OPTION option value)
|
||||
set(${option} ${value} CACHE INTERNAL "" FORCE)
|
||||
endmacro()
|
||||
|
||||
SET_OPTION(Plugin.SymbolResolver OFF)
|
||||
SET_OPTION(FMT_INSTALL OFF)
|
||||
|
||||
set(XZ_SOURCES
|
||||
xz_crc32.c
|
||||
xz_crc64.c
|
||||
|
|
@ -19,7 +14,10 @@ add_library(xz_static STATIC ${XZ_SOURCES})
|
|||
target_compile_options(xz_static PRIVATE -DXZ_USE_CRC64)
|
||||
target_include_directories(xz_static PRIVATE ${XZ_INCLUDES})
|
||||
|
||||
OPTION(LSPLANT_BUILD_SHARED OFF)
|
||||
option(LSPLANT_BUILD_SHARED OFF)
|
||||
option(Plugin.SymbolResolver OFF)
|
||||
option(FMT_INSTALL OFF)
|
||||
|
||||
add_subdirectory(dobby)
|
||||
add_subdirectory(fmt)
|
||||
add_subdirectory(lsplant/lsplant/src/main/jni)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
# External Dependencies
|
||||
|
||||
This directory contains all the external dependencies required to build the Vector framework.
|
||||
They are included as git submodules to ensure version consistency and timely updating.
|
||||
|
||||
## Native dependencies
|
||||
|
||||
- [Dobby](https://github.com/JingMatrix/Dobby):
|
||||
A lightweight, multi-platform inline hooking framework. It serves as the backend for all native function hooking (`HookInline`).
|
||||
|
||||
- [fmt](https://github.com/fmtlib/fmt):
|
||||
A modern formatting library used for high-performance, type-safe logging throughout the native code.
|
||||
|
||||
- [LSPlant](https://github.com/JingMatrix/LSPlant):
|
||||
A hooking framework for the Android Runtime (ART). It provides the core functionality for intercepting and modifying Java methods.
|
||||
|
||||
- [xz-embedded](https://github.com/tukaani-project/xz-embedded):
|
||||
A lightweight data compression library with a small footprint. It is used by the ELF parser to decompress the `.gnu_debugdata` section of stripped native libraries.
|
||||
|
||||
- [LSPlt](https://github.com/JingMatrix/LSPlt):
|
||||
A library for PLT (Procedure Linkage Table) hooking. It is used in the `dex2oat` sub-project to bypass a detection point. **Note:** This is included as a submodule for project convenience but is not compiled into the `external` C++ library itself.
|
||||
|
||||
## Java libraries
|
||||
|
||||
- [apache/commons-lang](https://github.com/apache/commons-lang):
|
||||
A package of Java utility classes for the classes that are in java.lang's hierarchy. Some classes are renamed and then used to implement the `XposedHelpers` API.
|
||||
|
||||
- [axml/manifest-editor](https://github.com/JingMatrix/ManifestEditor):
|
||||
A a tool used to modify Android Manifest binary file. It is to parse manifestation files of Xposed modules.
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
local/generated
|
||||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 675ab08d0eb62b7d2edd43fe42512c896e84bcd6
|
||||
|
|
@ -10,8 +10,8 @@ java {
|
|||
targetCompatibility = androidTargetCompatibility
|
||||
sourceSets {
|
||||
main {
|
||||
java.srcDirs("libs/manifest-editor/lib/src/main/java")
|
||||
resources.srcDirs("libs/manifest-editor/lib/src/main")
|
||||
java.srcDirs("manifest-editor/lib/src/main/java")
|
||||
resources.srcDirs("manifest-editor/lib/src/main")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit e79724341b797e5ad51f89e14ddb50b4bbba70db
|
||||
|
|
@ -3,7 +3,6 @@ agp = "8.13.1"
|
|||
kotlin = "2.2.21"
|
||||
nav = "2.9.6"
|
||||
appcenter = "5.0.5"
|
||||
libxposed = "100"
|
||||
glide = "5.0.5"
|
||||
okhttp = "5.3.2"
|
||||
ktfmt = "0.25.0"
|
||||
|
|
@ -59,6 +58,3 @@ gson = { module = "com.google.code.gson:gson", version = "2.13.2" }
|
|||
hiddenapibypass = { module = "org.lsposed.hiddenapibypass:hiddenapibypass", version = "6.1" }
|
||||
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
|
||||
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.10.2" }
|
||||
|
||||
libxposed-api = { group = "io.github.libxposed", name = "api", version.ref = "libxposed" }
|
||||
libxposed-interface = { group = "io.github.libxposed", name = "interface", version.ref = "libxposed" }
|
||||
|
|
|
|||
|
|
@ -36,11 +36,19 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
named("main") {
|
||||
java.srcDirs("src/main/java", "../libxposed/service/src/main")
|
||||
aidl.srcDirs("src/main/aidl", "../libxposed/interface/src/main/aidl")
|
||||
}
|
||||
}
|
||||
|
||||
aidlPackagedList += "org/lsposed/lspd/models/Module.aidl"
|
||||
aidlPackagedList += "org/lsposed/lspd/models/PreloadedApk.aidl"
|
||||
namespace = "org.lsposed.lspd.daemonservice"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(libs.androidx.annotation)
|
||||
compileOnly(projects.hiddenapi.stubs)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 496b76fa3e5af87958ebef97bd160319e05da79b
|
||||
|
|
@ -13,25 +13,17 @@ dependencyResolutionManagement {
|
|||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
mavenLocal {
|
||||
content {
|
||||
includeGroup("io.github.libxposed")
|
||||
}
|
||||
}
|
||||
}
|
||||
versionCatalogs {
|
||||
create("libs")
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "LSPosed"
|
||||
include(
|
||||
":apache",
|
||||
":app",
|
||||
":axml",
|
||||
":core",
|
||||
":daemon",
|
||||
":dex2oat",
|
||||
":external:axml",
|
||||
":external:apache",
|
||||
":hiddenapi:stubs",
|
||||
":hiddenapi:bridge",
|
||||
":magisk-loader",
|
||||
|
|
|
|||
|
|
@ -6,16 +6,18 @@ plugins {
|
|||
|
||||
ktfmt { kotlinLangStyle() }
|
||||
|
||||
val versionCodeProvider: Provider<String> by rootProject.extra
|
||||
val versionNameProvider: Provider<String> by rootProject.extra
|
||||
|
||||
android {
|
||||
namespace = "org.matrix.vector.xposed"
|
||||
|
||||
buildFeatures { androidResources { enable = false } }
|
||||
|
||||
sourceSets {
|
||||
named("main") {
|
||||
java.srcDirs("src/main/kotlin", "libxposed/api/src/main/java")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.libxposed.api)
|
||||
compileOnly(libs.androidx.annotation)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 54582730315ba4a3d7cfaf9baf9d23c419e07006
|
||||
Loading…
Reference in New Issue