Skip to content

Commit 254f535

Browse files
author
fangsy
committed
# Conflicts: # app/src/main/java/com/github/kr328/clash/MainApplication.kt
2 parents 7b07837 + 8851289 commit 254f535

15 files changed

Lines changed: 131 additions & 99 deletions

File tree

.github/workflows/build-debug.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Repository
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616

1717
- name: Checkout submodules
1818
run: git submodule update --init --recursive --force
1919

2020
- name: Setup Java
21-
uses: actions/setup-java@v4
21+
uses: actions/setup-java@v5
2222
with:
2323
distribution: "temurin"
2424
java-version: 21
2525

2626
- name: Setup Gradle
27-
uses: gradle/actions/setup-gradle@v4
27+
uses: gradle/actions/setup-gradle@v5
2828

2929
- name: Setup Go
30-
uses: actions/setup-go@v6
30+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
3131
with:
32-
go-version: "1.26"
33-
check-latest: true # Always check for the latest patch release
32+
go-download-base-url: 'https://github.com/MetaCubeX/go/releases/download/build'
33+
go-version: '1.26'
3434

3535
- name: Apply Patches
3636
run: |
3737
cd $(go env GOROOT)
3838
for p in $GITHUB_WORKSPACE/.github/patch/*.patch; do patch --verbose -p 1 < "$p"; done
3939
40-
- uses: actions/cache@v4
40+
- uses: actions/cache@v5
4141
with:
4242
path: |
4343
~/.cache/go-build
@@ -71,39 +71,39 @@ jobs:
7171
run: ./gradlew --no-daemon app:assembleAlphaRelease
7272

7373
- name: Upload Aritfact (universal)
74-
uses: actions/upload-artifact@v4
74+
uses: actions/upload-artifact@v7
7575
if: ${{ success() }}
7676
with:
7777
name: CMFA Debug Unsigned APK (universal)
7878
path: |
7979
app/build/outputs/apk/alpha/release/*-universal-*.apk
8080
8181
- name: Upload Aritfact (arm64-v8a)
82-
uses: actions/upload-artifact@v4
82+
uses: actions/upload-artifact@v7
8383
if: ${{ success() }}
8484
with:
8585
name: CMFA Debug Unsigned APK (arm64-v8a)
8686
path: |
8787
app/build/outputs/apk/alpha/release/*-arm64-v8a-*.apk
8888
8989
- name: Upload Aritfact (armeabi-v7a)
90-
uses: actions/upload-artifact@v4
90+
uses: actions/upload-artifact@v7
9191
if: ${{ success() }}
9292
with:
9393
name: CMFA Debug Unsigned APK (armeabi-v7a)
9494
path: |
9595
app/build/outputs/apk/alpha/release/*-armeabi-v7a-*.apk
9696
9797
- name: Upload Aritfact (x86_64)
98-
uses: actions/upload-artifact@v4
98+
uses: actions/upload-artifact@v7
9999
if: ${{ success() }}
100100
with:
101101
name: CMFA Debug Unsigned APK (x86_64)
102102
path: |
103103
app/build/outputs/apk/alpha/release/*-x86_64-*.apk
104104
105105
- name: Upload Aritfact (x86)
106-
uses: actions/upload-artifact@v4
106+
uses: actions/upload-artifact@v7
107107
if: ${{ success() }}
108108
with:
109109
name: CMFA Debug Unsigned APK (x86)

.github/workflows/build-pre-release.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout Repository
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v6
1414

1515
- name: Checkout submodules
1616
run: git submodule update --init --recursive --force
1717

1818
- name: Setup Java
19-
uses: actions/setup-java@v4
19+
uses: actions/setup-java@v5
2020
with:
2121
distribution: "temurin"
2222
java-version: 21
2323

2424
- name: Setup Gradle
25-
uses: gradle/actions/setup-gradle@v4
25+
uses: gradle/actions/setup-gradle@v5
2626

2727
- name: Setup Go
28-
uses: actions/setup-go@v6
28+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
2929
with:
30-
go-version: "1.26"
31-
check-latest: true # Always check for the latest patch release
30+
go-download-base-url: 'https://github.com/MetaCubeX/go/releases/download/build'
31+
go-version: '1.26'
3232

3333
- name: Apply Patches
3434
run: |
3535
cd $(go env GOROOT)
3636
for p in $GITHUB_WORKSPACE/.github/patch/*.patch; do patch --verbose -p 1 < "$p"; done
3737
38-
- uses: actions/cache@v4
38+
- uses: actions/cache@v5
3939
with:
4040
path: |
4141
~/.cache/go-build

.github/workflows/build-release.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,34 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Repository
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 0
1818

1919
- name: Checkout submodules
2020
run: git submodule update --init --recursive --force
2121

2222
- name: Setup Java
23-
uses: actions/setup-java@v4
23+
uses: actions/setup-java@v5
2424
with:
2525
distribution: "temurin"
2626
java-version: 21
2727

2828
- name: Setup Gradle
29-
uses: gradle/actions/setup-gradle@v4
29+
uses: gradle/actions/setup-gradle@v5
3030

3131
- name: Setup Go
32-
uses: actions/setup-go@v6
32+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
3333
with:
34-
go-version: "1.26"
35-
check-latest: true # Always check for the latest patch release
34+
go-download-base-url: 'https://github.com/MetaCubeX/go/releases/download/build'
35+
go-version: '1.26'
3636

3737
- name: Apply Patches
3838
run: |
3939
cd $(go env GOROOT)
4040
for p in $GITHUB_WORKSPACE/.github/patch/*.patch; do patch --verbose -p 1 < "$p"; done
4141
42-
- uses: actions/cache@v4
42+
- uses: actions/cache@v5
4343
with:
4444
path: |
4545
~/.cache/go-build

.github/workflows/update-dependencies.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout Repository
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v6
1414

1515
- name: Checkout and Update submodules
1616
run: git submodule update --init --recursive --remote --force
1717

1818
- name: Setup Java
19-
uses: actions/setup-java@v4
19+
uses: actions/setup-java@v5
2020
with:
2121
distribution: "temurin"
2222
java-version: 21
2323

2424
- name: Setup Go
25-
uses: actions/setup-go@v6
25+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
2626
with:
27-
go-version: "1.26"
28-
check-latest: true # Always check for the latest patch release
27+
go-download-base-url: 'https://github.com/MetaCubeX/go/releases/download/build'
28+
go-version: '1.26'
2929

3030
- name: Apply Patches
3131
run: |
3232
cd $(go env GOROOT)
3333
for p in $GITHUB_WORKSPACE/.github/patch/*.patch; do patch --verbose -p 1 < "$p"; done
3434
35-
- uses: actions/cache@v4
35+
- uses: actions/cache@v5
3636
with:
3737
path: |
3838
~/.cache/go-build
@@ -57,15 +57,16 @@ jobs:
5757
update-go-mod-replace ${{ github.workspace }}/core/src/foss/golang/clash/go.mod $(pwd)/go.mod
5858
go mod tidy
5959
60-
- uses: tibdex/github-app-token@v2
60+
- uses: actions/create-github-app-token@v3
6161
id: generate-token
6262
with:
63-
app_id: ${{ secrets.MAINTAINER_APPID }}
64-
private_key: ${{ secrets.MAINTAINER_APP_PRIVATE_KEY }}
63+
client-id: ${{ secrets.MAINTAINER_APPID }}
64+
private-key: ${{ secrets.MAINTAINER_APP_PRIVATE_KEY }}
65+
owner: ${{ github.repository_owner }}
6566

6667
- name: Create Pull Request
6768
id: cpr
68-
uses: peter-evans/create-pull-request@v6
69+
uses: peter-evans/create-pull-request@v8
6970
with:
7071
token: ${{ steps.generate-token.outputs.token }}
7172
commit-message: Update Dependencies

app/src/main/java/com/github/kr328/clash/AppSettingsActivity.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package com.github.kr328.clash
22

33
import android.content.ComponentName
44
import android.content.pm.PackageManager
5+
import androidx.core.content.pm.ShortcutManagerCompat
56
import com.github.kr328.clash.common.util.componentName
67
import com.github.kr328.clash.design.AppSettingsDesign
78
import com.github.kr328.clash.design.model.Behavior
9+
import com.github.kr328.clash.design.store.UiStore.Companion.mainActivityAlias
810
import com.github.kr328.clash.service.store.ServiceStore
911
import com.github.kr328.clash.util.ApplicationObserver
1012
import kotlinx.coroutines.isActive
@@ -69,9 +71,13 @@ class AppSettingsActivity : BaseActivity<AppSettingsDesign>(), Behavior {
6971
PackageManager.COMPONENT_ENABLED_STATE_ENABLED
7072
}
7173
packageManager.setComponentEnabledSetting(
72-
ComponentName(this, mainActivityAlias),
74+
mainActivityAlias,
7375
newState,
7476
PackageManager.DONT_KILL_APP
7577
)
78+
if (hide) {
79+
// Prevent launcher activity not found.
80+
ShortcutManagerCompat.removeAllDynamicShortcuts(this)
81+
}
7682
}
77-
}
83+
}

app/src/main/java/com/github/kr328/clash/MainActivity.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,3 @@ class MainActivity : BaseActivity<MainDesign>() {
188188
}
189189
}
190190
}
191-
192-
val mainActivityAlias = "${MainActivity::class.java.name}Alias"

app/src/main/java/com/github/kr328/clash/MainApplication.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.github.kr328.clash.common.Global
1010
import com.github.kr328.clash.common.compat.currentProcessName
1111
import com.github.kr328.clash.common.constants.Intents
1212
import com.github.kr328.clash.common.log.Log
13+
import com.github.kr328.clash.design.store.UiStore
1314
import com.github.kr328.clash.remote.Remote
1415
import com.github.kr328.clash.service.util.sendServiceRecreated
1516
import com.github.kr328.clash.util.clashDir
@@ -20,6 +21,8 @@ import com.github.kr328.clash.design.R as DesignR
2021

2122
@Suppress("unused")
2223
class MainApplication : Application() {
24+
private val uiStore by lazy(LazyThreadSafetyMode.NONE) { UiStore(this) }
25+
2326
private var wifiAutomator: WifiAutomator? = null
2427

2528
override fun attachBaseContext(base: Context?) {
@@ -47,6 +50,12 @@ class MainApplication : Application() {
4750
}
4851

4952
private fun setupShortcuts() {
53+
if (uiStore.hideAppIcon) {
54+
// Prevent launcher activity not found.
55+
ShortcutManagerCompat.removeAllDynamicShortcuts(this)
56+
return
57+
}
58+
5059
val icon = IconCompat.createWithResource(this, R.mipmap.ic_launcher)
5160
val flags = Intent.FLAG_ACTIVITY_NEW_TASK or
5261
Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS or

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ subprojects {
5858
minSdk = 21
5959
targetSdk = 35
6060

61-
versionName = "2.11.24"
62-
versionCode = 211024
61+
versionName = "2.11.27"
62+
versionCode = 211027
6363

6464
resValue("string", "release_name", "v$versionName")
6565
resValue("integer", "release_code", "$versionCode")

core/src/foss/golang/clash

Submodule clash updated 185 files

core/src/foss/golang/go.mod

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ require (
1111
github.com/andybalholm/brotli v1.0.6 // indirect
1212
github.com/bahlo/generic-list-go v0.2.0 // indirect
1313
github.com/coreos/go-iptables v0.8.0 // indirect
14-
github.com/dlclark/regexp2 v1.11.5 // indirect
14+
github.com/dlclark/regexp2 v1.12.0 // indirect
1515
github.com/dunglas/httpsfv v1.0.2 // indirect
16-
github.com/enfein/mieru/v3 v3.29.0 // indirect
16+
github.com/enfein/mieru/v3 v3.31.0 // indirect
1717
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 // indirect
1818
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 // indirect
1919
github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 // indirect
@@ -43,35 +43,36 @@ require (
4343
github.com/metacubex/blake3 v0.1.0 // indirect
4444
github.com/metacubex/chacha v0.1.5 // indirect
4545
github.com/metacubex/chi v0.1.0 // indirect
46-
github.com/metacubex/connect-ip-go v0.0.0-20260128031117-1cad62060727 // indirect
46+
github.com/metacubex/connect-ip-go v0.0.0-20260412152424-e1625567920a // indirect
4747
github.com/metacubex/cpu v0.1.1 // indirect
4848
github.com/metacubex/edwards25519 v1.2.0 // indirect
4949
github.com/metacubex/fswatch v0.1.1 // indirect
5050
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 // indirect
5151
github.com/metacubex/gvisor v0.0.0-20251227095601-261ec1326fe8 // indirect
5252
github.com/metacubex/hkdf v0.1.0 // indirect
5353
github.com/metacubex/hpke v0.1.0 // indirect
54-
github.com/metacubex/http v0.1.0 // indirect
54+
github.com/metacubex/http v0.1.2 // indirect
5555
github.com/metacubex/kcp-go v0.0.0-20260105040817-550693377604 // indirect
56+
github.com/metacubex/mhurl v0.1.0 // indirect
5657
github.com/metacubex/mihomo v1.7.0 // indirect
5758
github.com/metacubex/mlkem v0.1.0 // indirect
5859
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 // indirect
5960
github.com/metacubex/qpack v0.6.0 // indirect
60-
github.com/metacubex/quic-go v0.59.1-0.20260213014310-4df8f0de5b56 // indirect
61+
github.com/metacubex/quic-go v0.59.1-0.20260413153657-53bb22f2c306 // indirect
6162
github.com/metacubex/randv2 v0.2.0 // indirect
6263
github.com/metacubex/restls-client-go v0.1.7 // indirect
6364
github.com/metacubex/sing v0.5.7 // indirect
64-
github.com/metacubex/sing-mux v0.3.5 // indirect
65-
github.com/metacubex/sing-quic v0.0.0-20260112044712-65d17608159e // indirect
65+
github.com/metacubex/sing-mux v0.3.9 // indirect
66+
github.com/metacubex/sing-quic v0.0.0-20260414034501-3ea3410d197a // indirect
6667
github.com/metacubex/sing-shadowsocks v0.2.12 // indirect
6768
github.com/metacubex/sing-shadowsocks2 v0.2.7 // indirect
6869
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 // indirect
69-
github.com/metacubex/sing-tun v0.4.16 // indirect
70+
github.com/metacubex/sing-tun v0.4.17 // indirect
7071
github.com/metacubex/sing-vmess v0.2.5 // indirect
7172
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f // indirect
7273
github.com/metacubex/smux v0.0.0-20260105030934-d0c8756d3141 // indirect
7374
github.com/metacubex/tfo-go v0.0.0-20251130171125-413e892ac443 // indirect
74-
github.com/metacubex/tls v0.1.4 // indirect
75+
github.com/metacubex/tls v0.1.5 // indirect
7576
github.com/metacubex/utls v1.8.4 // indirect
7677
github.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f // indirect
7778
github.com/metacubex/yamux v0.0.0-20250918083631-dd5f17c0be49 // indirect

0 commit comments

Comments
 (0)