Skip to content

Commit a6f8035

Browse files
committed
Upload most of the program code for version v1.0.1
For important reasons, we cannot publicly disclose the manager's program code
1 parent 1973747 commit a6f8035

141 files changed

Lines changed: 2286 additions & 5042 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
name: Build Adnroid CI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
name: Build on Ubuntu
9+
runs-on: ubuntu-latest
10+
11+
env:
12+
CCACHE_COMPILERCHECK: '%compiler% -dumpmachine; %compiler% -dumpversion'
13+
CCACHE_NOHASHDIR: 'true'
14+
CCACHE_HARDLINK: 'true'
15+
CCACHE_BASEDIR: '${{ github.workspace }}'
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
submodules: 'false'
23+
24+
- name: Set up JDK
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: '17'
28+
distribution: 'zulu'
29+
30+
- name: Cache Gradle packages
31+
uses: gradle/gradle-build-action@v3
32+
with:
33+
gradle-home-cache-cleanup: true
34+
35+
- name: Set up ccache
36+
uses: hendrikmuhs/ccache-action@v1.2
37+
with:
38+
max-size: 2G
39+
key: ccache-${{ runner.os }}-${{ github.sha }}
40+
restore-keys: |
41+
ccache-${{ runner.os }}-
42+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
43+
44+
- name: Cache local Maven repository
45+
uses: actions/cache@v4
46+
with:
47+
path: ~/.m2/repository
48+
key: maven-${{ runner.os }}-${{ hashFiles('libxposed/api/**', 'libxposed/service/**') }}
49+
restore-keys: |
50+
maven-${{ runner.os }}-
51+
52+
- name: Configure release signing key
53+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
54+
run: |
55+
if [ -n "${{ secrets.KEY_STORE }}" ]; then
56+
echo "正在配置签名属性..."
57+
cat << EOF >> gradle.properties
58+
androidStorePassword=${{ secrets.KEY_STORE_PASSWORD }}
59+
androidKeyAlias=${{ secrets.ALIAS }}
60+
androidKeyPassword=${{ secrets.KEY_PASSWORD }}
61+
androidStoreFile=key.jks
62+
EOF
63+
echo ${{ secrets.KEY_STORE }} | base64 --decode > key.jks
64+
echo "签名密钥配置完成。"
65+
else
66+
echo "签名密钥未配置,跳过签名步骤。"
67+
fi
68+
shell: bash
69+
70+
- name: Build project with Gradle
71+
run: |
72+
cat << EOF >> gradle.properties
73+
org.gradle.parallel=true
74+
org.gradle.jvmargs=-Xmx2048m
75+
android.native.buildOutput=verbose
76+
EOF
77+
78+
echo "正在构建 libxposed API..."
79+
(cd libxposed/api && ./gradlew :api:publishApiPublicationToMavenLocal)
80+
81+
echo "正在构建 libxposed service..."
82+
(cd libxposed/service && ./gradlew :interface:publishInterfacePublicationToMavenLocal)
83+
84+
echo "正在构建 NPatch..."
85+
./gradlew buildAll
86+
shell: bash
87+
88+
- name: Upload Debug artifacts
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: lspatch-debug
92+
path: out/debug/*
93+
94+
- name: Upload Release artifacts
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: lspatch-release
98+
path: out/release/*
99+
100+
- name: Upload ProGuard mappings
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: mappings
104+
path: |
105+
patch-loader/build/outputs/mapping
106+
manager/build/outputs/mapping
107+
108+
- name: Upload native symbols
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: symbols
112+
path: patch-loader/build/symbols
113+
114+
- name: Post artifacts to Telegram
115+
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/master'
116+
env:
117+
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
118+
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
119+
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
120+
run: |
121+
if [ -n "${{ secrets.BOT_TOKEN }}" ]; then
122+
jarRelease=$(find out/release -name "*.jar")
123+
managerRelease=$(find out/release -name "*.apk")
124+
jarDebug=$(find out/debug -name "*.jar")
125+
managerDebug=$(find out/debug -name "*.apk")
126+
127+
CAPTION=$(echo "$COMMIT_MESSAGE" | head -n 1)
128+
129+
echo "正在上传产物到 Telegram..."
130+
131+
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup" \
132+
-F chat_id="${CHANNEL_ID}" \
133+
-F media='[
134+
{"type": "document", "media": "attach://jarRelease"},
135+
{"type": "document", "media": "attach://managerRelease"},
136+
{"type": "document", "media": "attach://jarDebug"},
137+
{"type": "document", "media": "attach://managerDebug", "caption": "'"${CAPTION}"'"}
138+
]' \
139+
-F jarRelease="@${jarRelease}" \
140+
-F managerRelease="@${managerRelease}" \
141+
-F jarDebug="@${jarDebug}" \
142+
-F managerDebug="@${managerDebug}"
143+
else
144+
echo "BOT_TOKEN 未配置,跳过发送到 Telegram。"
145+
fi
146+
shell: bash

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ libxposed
1818
.cxx
1919
/out
2020
/.idea
21+
*.log

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
branch = android10-release
55
[submodule "core"]
66
path = core
7-
url = https://github.com/HSSkyBoy/LSPosed-JingMatrix.git
7+
url = https://github.com/HSSkyBoy/Vector.git
88
branch = master

build.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ buildscript {
2626

2727
val commitCount = run {
2828
val repo = FileRepository(rootProject.file(".git"))
29-
val refId = repo.refDatabase.exactRef("refs/remotes/origin/main").objectId!!
29+
val refId = repo.refDatabase.exactRef("refs/remotes/origin/miuix").objectId!!
3030
Git(repo).log().add(refId).call().count()
3131
}
3232

33-
val (coreCommitCount, coreLatestTag) = FileRepositoryBuilder().setGitDir(rootProject.file(".git/modules/core"))
33+
val (coreCommitCount, coreLatestTag) = FileRepositoryBuilder().setGitDir(rootProject.file("core/.git"))
34+
.setWorkTree(rootProject.file("core"))
3435
.runCatching {
3536
build().use { repo ->
3637
val git = Git(repo)
@@ -49,7 +50,7 @@ val (coreCommitCount, coreLatestTag) = FileRepositoryBuilder().setGitDir(rootPro
4950
val defaultManagerPackageName by extra("org.lsposed.npatch")
5051
val apiCode by extra(100)
5152
val verCode by extra(commitCount)
52-
val verName by extra("0.8.0")
53+
val verName by extra("1.0.1")
5354
val coreVerCode by extra(coreCommitCount)
5455
val coreVerName by extra(coreLatestTag)
5556
val androidMinSdkVersion by extra(28)
@@ -105,9 +106,9 @@ fun Project.configureBaseExtension() {
105106

106107
externalNativeBuild {
107108
cmake {
109+
arguments += "-DVECTOR_ROOT=${File(rootDir.absolutePath, "core")}"
108110
arguments += "-DEXTERNAL_ROOT=${File(rootDir.absolutePath, "core/external")}"
109-
arguments += "-DCORE_ROOT=${File(rootDir.absolutePath,
110-
"core/core/src/main/jni")}"
111+
arguments += "-DCORE_ROOT=${File(rootDir.absolutePath, "core/native") }"
111112
abiFilters("arm64-v8a", "x86_64")
112113
val flags = arrayOf(
113114
"-Wall",

gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
android.experimental.enableNewResourceShrinker.preciseShrinking=true
2-
android.enableR8.fullMode=true
32
android.useAndroidX=true
3+
android.enableJetifier=false
4+
android.enableR8.fullMode=true
45
org.gradle.caching=true
56
org.gradle.parallel=true
6-
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8 -XX:+UseParallelGC
7+
org.gradle.jvmargs=-Xmx8g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:SoftRefLRUPolicyMSPerMB=0
78
android.native.buildOutput=verbose

gradle/lspatch.versions.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[versions]
2+
room = "2.5.2"
3+
accompanist = "0.27.0"
4+
compose-destinations = "1.9.42-beta"
5+
shizuku = "13.1.5"
6+
hiddenapi-refine = "4.3.0"
7+
hiddenapi-stub = "4.2.0"
8+
compose-bom = "2023.06.01"
9+
kotlin = "2.0.0"
10+
kotlinx = "1.8.1"
11+
ksp = "2.0.0-1.0.22"
12+
commons-io = "2.13.0"
13+
beust-jcommander = "1.82"
14+
google-gson = "2.10.1"
15+
16+
[plugins]
17+
google-devtools-ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
18+
rikka-tools-refine = { id = "dev.rikka.tools.refine", version.ref = "hiddenapi-refine" }
19+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
20+
21+
[libraries]
22+
androidx-customview = "androidx.customview:customview:1.2.0-alpha02"
23+
androidx-customview-poolingcontainer = "androidx.customview:customview-poolingcontainer:1.0.0"
24+
25+
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "compose-bom" }
26+
androidx-compose-ui = { module = "androidx.compose.ui:ui" }
27+
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
28+
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
29+
androidx-compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
30+
androidx-compose-material3 = { module = "androidx.compose.material3:material3" }
31+
32+
androidx-navigation-compose = "androidx.navigation:navigation-compose:2.6.0"
33+
34+
androidx-lifecycle-viewmodel-compose = "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1"
35+
36+
androidx-activity-compose = "androidx.activity:activity-compose:1.7.2"
37+
38+
androidx-core-ktx = "androidx.core:core-ktx:1.10.1"
39+
40+
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" }
41+
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
42+
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
43+
44+
google-accompanist-navigation-animation = { module = "com.google.accompanist:accompanist-navigation-animation", version.ref = "accompanist" }
45+
google-accompanist-pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanist" }
46+
google-accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
47+
48+
rikka-shizuku-api = { module = "dev.rikka.shizuku:api", version.ref = "shizuku" }
49+
rikka-shizuku-provider = { module = "dev.rikka.shizuku:provider", version.ref = "shizuku" }
50+
51+
rikka-refine = { module = "dev.rikka.tools.refine:runtime", version.ref = "hiddenapi-refine" }
52+
53+
rikka-hidden-stub = { module = "dev.rikka.hidden:stub", version.ref = "hiddenapi-stub" }
54+
55+
raamcosta-compose-destinations = { module = "io.github.raamcosta.compose-destinations:core", version.ref = "compose-destinations" }
56+
raamcosta-compose-destinations-ksp = { module = "io.github.raamcosta.compose-destinations:ksp", version.ref = "compose-destinations" }
57+
58+
commons-io = { module = "commons-io:commons-io", version.ref = "commons-io" }
59+
60+
beust-jcommander = { module = "com.beust:jcommander", version.ref = "beust-jcommander" }
61+
62+
google-gson = { module = "com.google.code.gson:gson", version.ref = "google-gson" }

manager/build.gradle.kts

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,19 @@ android {
2121
applicationId = defaultManagerPackageName
2222
}
2323

24+
androidResources {
25+
noCompress.add(".so")
26+
}
27+
2428
packaging {
2529
jniLibs {
26-
useLegacyPackaging = true
30+
excludes += "lib/*/libandroidx.graphics.path.so"
31+
}
32+
resources {
33+
excludes += "kotlin/**"
34+
excludes += "META-INF/androidx*"
35+
excludes += "META-INF/androidx/**"
36+
excludes += "DebugProbesKt.bin"
2737
}
2838
}
2939

@@ -103,30 +113,40 @@ dependencies {
103113
implementation(npatch.androidx.compose.ui)
104114
implementation(npatch.androidx.compose.ui.tooling.preview)
105115
implementation(npatch.androidx.core.ktx)
116+
implementation(libs.material)
117+
implementation(npatch.androidx.datastore.preferences)
118+
implementation(npatch.coil.compose)
119+
implementation(libs.gson)
106120
implementation(npatch.androidx.lifecycle.viewmodel.compose)
107-
implementation(npatch.androidx.navigation.compose)
121+
implementation(npatch.androidx.navigation3.runtime)
122+
implementation(npatch.androidx.navigation3.ui)
108123
implementation(libs.androidx.preference)
109124
implementation(npatch.androidx.room.ktx)
110125
implementation(npatch.androidx.room.runtime)
126+
implementation("com.squareup.okhttp3:okhttp:5.3.2")
111127

112-
implementation(npatch.google.accompanist.navigation.animation)
113-
implementation(npatch.google.accompanist.pager)
114-
implementation(npatch.google.accompanist.swiperefresh)
115128
implementation(libs.material)
116129
implementation(libs.gson)
117130
implementation(npatch.rikka.shizuku.api)
118131
implementation(npatch.rikka.shizuku.provider)
119132
implementation(npatch.rikka.refine)
120-
implementation(npatch.raamcosta.compose.destinations)
133+
//implementation(npatch.raamcosta.compose.destinations)
121134
implementation(libs.appiconloader)
122135
implementation(libs.hiddenapibypass)
123136

137+
// MiuiX & Haze
138+
implementation(npatch.miuix.android)
139+
implementation(npatch.haze)
140+
implementation("top.yukonga.miuix.kmp:miuix-icons:0.8.7")
141+
implementation(npatch.androidx.webkit)
142+
143+
124144
annotationProcessor(npatch.androidx.room.compiler)
125145
compileOnly(npatch.rikka.hidden.stub)
126146
ksp(npatch.androidx.room.compiler)
127-
ksp(npatch.raamcosta.compose.destinations.ksp)
147+
//ksp(npatch.raamcosta.compose.destinations.ksp)
128148

129149
debugImplementation(npatch.androidx.compose.ui.tooling)
130150
debugImplementation(npatch.androidx.customview)
131151
debugImplementation(npatch.androidx.customview.poolingcontainer)
132-
}
152+
}

manager/proguard-rules.pro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
-assumenosideeffects public class kotlin.coroutines.jvm.internal.DebugMetadataKt {
99
private static ** getDebugMetadataAnnotation(...) return null;
1010
}
11+
-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod
1112
-keep class com.beust.jcommander.** { *; }
1213
-keep interface com.beust.jcommander.** { *; }
13-
-keepclassmembers class org.lsposed.patch.NPatch {
14-
@com.beust.jcommander.Parameter *;
14+
-keep class org.lsposed.npatch.patch.NPatch { *; }
15+
-keepclassmembers class org.lsposed.npatch.patch.NPatch {
16+
@com.beust.jcommander.Parameter <fields>;
1517
}
1618

1719
-keepclassmembers class org.lsposed.npatch.database.dao.** { *; }
9.41 KB
Binary file not shown.
-91.3 KB
Loading

0 commit comments

Comments
 (0)