-
-
Notifications
You must be signed in to change notification settings - Fork 11
Android 7 Support #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 216 commits
9ae646c
b63d8de
4f60933
95fe8d2
2d10ee8
68dbbb1
3ef4145
bb067df
ccb2c99
c87f1b1
499cf7e
3196eb2
49fd1d6
60dd195
9d2f486
3c8f7a7
531c339
759d898
0ee9c01
a1db079
be21258
7fe985c
a988781
26e831c
7466a2a
a61298f
b524c19
3dd8177
2835ed8
bac0afc
a8de4b7
b0aca04
accd6ef
5186a79
3e96314
f40358b
b8c97ec
af93022
e4d3076
7df0b4d
5197dcd
b5e0444
00f78e9
14926cf
c0d67db
4780547
a42355a
f3a567e
e477895
491ffb2
7d4b503
a34d6b0
4a4e402
d0a903f
5256db4
58c4766
43fcd55
b6f7a07
03c9107
8287190
1b5cfb1
2c7d738
c3923f6
ffb1a74
9b729d4
316bcaa
4927571
68e5f14
5a21c92
e1cc72e
3aa74b6
173e75f
2a57d14
57cf8f2
036b81a
4b436d2
a332100
1638054
8134375
390372a
5ae067f
e71bcef
cd81410
90bfd96
8c0f977
1f1f5e4
35722f5
2e3d17b
465a839
b4031d0
4fd4c0b
feb52d7
57dcf96
bbffbcf
ba6b0d1
5ed771d
9ab7d8e
c43b13b
f2167b8
b5176b3
a0bb5fe
4e623ae
fd47625
bcc23e0
408d1a7
0fab96c
97d1c41
6ffbfbc
4052beb
6eeb755
b84cac6
e1b1377
0aedc98
e4a6192
c602a4d
dc6e328
053d4ed
bbc775a
4453f6f
85abbc7
d49a4ba
4c3303e
4cb693a
8949927
3927c8c
ed822c9
4e09a3c
4280a83
148eefd
dc8cd50
ce00543
a963e79
c5307b3
2945c49
221d38a
b3c5730
71af713
3d83cf9
2f82c47
4155585
d91e9e3
ac8ec1e
aafd496
d79f587
18b865b
fa55c6c
7acfb09
9a9a0ee
2981b85
bd519e4
3d2dde8
2f88102
3a9e0ea
022e624
32b5abb
c7f2aca
b708e01
53054f7
be8513f
e04f45c
f51da7f
21f03cd
1b5c54f
af45192
90f03ff
02d98f4
43abe5f
acfb4e6
70e52d5
0d410a0
b8b5189
fc5e989
91c2cd1
c5a4d72
b8556d9
e25e341
8160aaa
5b4c394
9efb40c
4a4a043
834e58b
5de31f2
00a50a6
0147f0d
91e19d2
3b17ecc
dee45f7
56e760e
09f68f3
fd2b646
6f42827
55ca62a
6587cfe
c4834df
ae48200
2a1452f
3938ae5
c4b8179
520cfab
ecfcb00
8884ea6
9a4e0c2
25eb43d
a86ae0b
fc25f4c
187b056
764e784
8602e8e
5b94d0f
63cac8a
02261b3
51ed115
fec6032
3af3fa2
1e04289
269cc23
273bfe0
57ba38c
5a793b4
dd107d4
573bd88
b3eab15
81661cf
e518ed3
2b675e4
52c6a67
8c7473f
5624231
3977fac
7b34198
2f4bc57
a5fd0bf
0cc6da4
c5ce2aa
7bd6a59
94f099e
e44ae38
0d4d556
1c70691
2c31dfd
0130d99
a6dcced
e505018
3b5ec0e
75bc436
2c09ad2
76566a9
827142b
fefe63f
ae289d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| name: Sync Fork (Keep My Code) | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 */6 * * *' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| sync: | ||
| name: Sync with Upstream (Keep My Changes) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.PAT_TOKEN }} | ||
|
|
||
| - name: Get upstream repo URL | ||
| id: upstream | ||
| env: | ||
| GH_TOKEN: ${{ secrets.PAT_TOKEN }} | ||
| run: | | ||
| UPSTREAM=$(gh api repos/${{ github.repository }} --jq '.parent.full_name') | ||
| if [ -z "$UPSTREAM" ] || [ "$UPSTREAM" = "null" ]; then | ||
| echo "This repo is not a fork!" | ||
| exit 1 | ||
| fi | ||
| echo "repo=$UPSTREAM" >> $GITHUB_OUTPUT | ||
| echo "Upstream found: $UPSTREAM" | ||
|
|
||
| - name: Config Git | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| - name: Merge upstream keep my code on conflict | ||
| id: merge | ||
| run: | | ||
| git remote add upstream https://github.com/${{ steps.upstream.outputs.repo }}.git | ||
| git fetch upstream main | ||
| BEFORE=$(git rev-parse HEAD) | ||
| git merge upstream/main --strategy-option ours --allow-unrelated-histories --no-edit || echo "Nothing to merge" | ||
| AFTER=$(git rev-parse HEAD) | ||
| if [ "$BEFORE" != "$AFTER" ]; then | ||
| echo "changed=true" >> $GITHUB_OUTPUT | ||
| echo "Code changed, will push and trigger build" | ||
| else | ||
| echo "changed=false" >> $GITHUB_OUTPUT | ||
| echo "No changes" | ||
| fi | ||
|
|
||
| - name: Push | ||
| if: steps.merge.outputs.changed == 'true' | ||
| run: git push origin main |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,76 +12,91 @@ android { | |
|
|
||
| defaultConfig { | ||
| applicationId "com.app.ralaunch" | ||
| minSdk 28 | ||
|
|
||
| // ... Support for Android 7... | ||
| minSdk 24 | ||
| targetSdk 35 | ||
| versionCode 3 | ||
| versionName "2.0.1" | ||
|
|
||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
|
|
||
| // 只编译 arm64-v8a 架构 | ||
| // 使用 splits 配置 | ||
|
|
||
| // ... Enable multidex to prevent method limit issues on older devices ... | ||
| multiDexEnabled true | ||
| externalNativeBuild { | ||
| cmake { | ||
|
|
||
| // ... Ensure C++ native code compiles for API 25 compatibility ... | ||
| arguments "-DANDROID_PLATFORM=android-25" | ||
| } | ||
| } | ||
| } | ||
| // =================================================================== | ||
| // ... Hacky way: Use a hardcoded dummy keystore for CI/CD ... | ||
| // ... This ensures the signature is identical every time! ... | ||
| // =================================================================== | ||
| signingConfigs { | ||
| release { | ||
| storeFile file("dummy.keystore") | ||
| storePassword "123456" | ||
| keyAlias "ralaunch" | ||
| keyPassword "123456" | ||
|
|
||
| enableV1Signing true | ||
| enableV2Signing true | ||
| enableV3Signing true | ||
| } | ||
| } | ||
|
|
||
| buildTypes { | ||
| debug { | ||
| debuggable true | ||
| minifyEnabled false | ||
| jniDebuggable true // 启用 Native 调试 | ||
|
|
||
|
|
||
| } | ||
| release { | ||
| debuggable false | ||
| minifyEnabled false // TODO: 修复类重复后启用 R8 | ||
| minifyEnabled false | ||
| shrinkResources false | ||
| proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
|
|
||
| // Release 移除调试符号,减小 native 库体积 | ||
| // ... Apply the dummy signing config ... | ||
| signingConfig signingConfigs.release | ||
|
|
||
| externalNativeBuild { | ||
| cmake { | ||
| arguments "-DCMAKE_BUILD_TYPE=Release" | ||
| arguments "-DCMAKE_BUILD_TYPE=Release", "-DANDROID_PLATFORM=android-25" | ||
| } | ||
|
Comment on lines
27
to
59
|
||
| } | ||
| } | ||
| } | ||
|
|
||
| compileOptions { | ||
| sourceCompatibility JavaVersion.VERSION_21 | ||
| targetCompatibility JavaVersion.VERSION_21 | ||
| // ... Keep desugaring enabled for other modern Java APIs safely ... | ||
| coreLibraryDesugaringEnabled true | ||
| sourceCompatibility JavaVersion.VERSION_17 | ||
| targetCompatibility JavaVersion.VERSION_17 | ||
| } | ||
|
|
||
| externalNativeBuild { | ||
| cmake { | ||
| path file('src/main/cpp/CMakeLists.txt') | ||
| version '3.22.1' | ||
| } | ||
| } | ||
|
|
||
| buildFeatures { | ||
| viewBinding true | ||
| prefab true | ||
| compose true | ||
| } | ||
|
|
||
| // 禁止 AAPT 压缩这些文件类型,确保 AssetManager 能正确读取 | ||
| androidResources { | ||
| noCompress += ['tar.gz', 'tar.xz', 'xz'] | ||
| } | ||
|
|
||
| packagingOptions { | ||
| jniLibs { | ||
| useLegacyPackaging = true | ||
| // Debug 版本保留符号便于调试,Release 版本移除符号减小体积 | ||
| // keepDebugSymbols += ['**/*.so'] // 仅 debug 时启用 | ||
| pickFirsts += ['lib/arm64-v8a/libc++_shared.so', 'lib/arm64-v8a/libdotnethost.so'] | ||
| } | ||
| } | ||
|
|
||
| // 临时只针对真机arm64-v8a编译 | ||
| splits { | ||
| abi { | ||
| enable true | ||
|
|
@@ -91,7 +106,6 @@ android { | |
| } | ||
| } | ||
|
|
||
| // 使用预编译的 System.Security.Cryptography jar,实现官方托管绑定 | ||
| sourceSets { | ||
| main { | ||
| java { | ||
|
|
@@ -101,49 +115,51 @@ android { | |
| } | ||
|
|
||
| kotlinOptions { | ||
| jvmTarget = '21' | ||
| jvmTarget = '17' | ||
| } | ||
|
|
||
| // 关闭 Lint 检查 | ||
| lint { | ||
| abortOnError false | ||
| checkReleaseBuilds false | ||
| } | ||
| } | ||
|
|
||
| // ... DEPENDENCIES BLOCK (Outside and at the bottom) ... | ||
| dependencies { | ||
| // 本地 JAR/AAR 依赖 | ||
| // ... Desugaring library ... | ||
| coreLibraryDesugaring libs.desugar.jdk.libs | ||
|
|
||
| // ... Multidex support ... | ||
| implementation 'androidx.multidex:multidex:2.0.1' | ||
|
|
||
| // ... Local libraries ... | ||
| implementation files('../app/libs/libSystem.Security.Cryptography.Native.Android.jar') | ||
| implementation files('../external/libs/fmod.jar') | ||
| implementation files('libs/fishnet-release.aar') | ||
|
|
||
| // 项目模块 | ||
| implementation project(':shared') | ||
|
|
||
| // 从 ralib 迁移的依赖 | ||
| // ... 3rd party libraries ... | ||
| implementation 'com.github.omicronapps:7-Zip-JBinding-4Android:Release-16.02-2.03' | ||
| implementation 'com.google.code.gson:gson:2.13.2' | ||
|
|
||
| // AndroidX 核心库 | ||
| implementation libs.core.ktx | ||
| implementation libs.appcompat | ||
| implementation libs.activity | ||
| implementation libs.constraintlayout | ||
| implementation libs.recyclerview | ||
|
|
||
| // Material Design | ||
| implementation libs.material | ||
|
|
||
| // Kotlin 扩展 | ||
| // ... Coroutines & Serialization ... | ||
| implementation libs.kotlinx.coroutines.core | ||
| implementation libs.kotlinx.coroutines.android | ||
| implementation libs.kotlinx.serialization.json | ||
|
|
||
| // Haze (Glassmorphism blur) | ||
| // ... UI effects ... | ||
| implementation libs.haze | ||
| implementation libs.haze.materials | ||
|
|
||
| // Compose | ||
| // ... Jetpack Compose ... | ||
| implementation platform(libs.compose.bom) | ||
| implementation libs.compose.ui | ||
| implementation libs.compose.ui.graphics | ||
|
|
@@ -157,19 +173,20 @@ dependencies { | |
| implementation 'com.github.jeziellago:compose-markdown:0.5.8' | ||
| debugImplementation 'androidx.compose.ui:ui-tooling' | ||
|
|
||
| // Koin DI | ||
| // ... Koin DI ... | ||
| implementation libs.koin.core | ||
| implementation libs.koin.android | ||
| implementation libs.koin.compose | ||
|
|
||
| // 第三方工具库 | ||
| // ... Misc tools ... | ||
| implementation libs.glide | ||
| implementation libs.konfetti | ||
| implementation libs.commons.compress | ||
| implementation libs.xz | ||
| implementation 'org.tukaani:xz:1.9' // <--- KEEPT: Our custom ArchiveExtractor needs this to read .xz files! | ||
| implementation libs.android.svg | ||
|
|
||
| // ... NOTE: libs.commons.compress HAS BEEN COMPLETELY PURGED! | ||
|
|
||
| // 测试依赖 | ||
| // ... Testing ... | ||
| testImplementation libs.junit | ||
| androidTestImplementation libs.ext.junit | ||
| androidTestImplementation libs.espresso.core | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release signing config hardcodes a keystore filename plus plaintext passwords in
app/build.gradle. This is a security risk and makes local release builds unintentionally sign with a dummy key. Move signing configuration to CI-only (or~/.gradle/gradle.properties/ environment variables) and keep secrets/keystore out of source control.