Skip to content

Commit 4b591ef

Browse files
authored
chore: Merge branch dev to main (#2406)
2 parents f4b279d + 123c517 commit 4b591ef

File tree

14 files changed

+350
-216
lines changed

14 files changed

+350
-216
lines changed

.github/workflows/build_pull_request.yml

Lines changed: 76 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,42 @@ name: Build pull request
33
on:
44
workflow_dispatch:
55
inputs:
6-
# Enable or disable cache
7-
flutter-cache:
8-
description: Cache
9-
type: boolean
10-
default: true
11-
12-
# Select app flavour
13-
app-flavour:
14-
description: App flavour
6+
# Select pull request
7+
pr-number:
8+
description: PR number (Without hashtag)
9+
required: true
10+
# Select app flavor
11+
app-flavor:
12+
description: App flavor
1513
default: 'release'
1614
type: choice
17-
options:
15+
options:
1816
- release
1917
- debug
2018
- profile
21-
22-
# Select pull request
23-
pr-number:
24-
description: PR number (Without hashtag)
25-
required: true
19+
20+
# Flutter Configurations,
21+
# it's recommended to be set when you have problem regarding with flutter itself
22+
# For most part you do not need to change this.
23+
24+
# Flutter version to use, note that the version had to exist in whether channel
25+
# to grab
26+
# Try using exact version or particular version on a specific branch instead of "any"
27+
flutter-channel:
28+
description: Flutter channel
29+
default: 'stable'
30+
type: choice
31+
options:
32+
- stable
33+
- beta
34+
- dev
35+
- any
36+
flutter-version:
37+
description: Flutter version
38+
default: '3.29.x'
2639

2740
run-name: "Build pull request ${{ inputs.pr-number }}"
28-
41+
2942
jobs:
3043
build:
3144
name: Build
@@ -34,84 +47,91 @@ jobs:
3447
contents: read
3548
pull-requests: write
3649
steps:
37-
- name: Setup pull request
38-
env:
39-
GH_TOKEN: ${{ github.token }}
40-
run: |
41-
gh repo clone "${{ github.repository }}"
42-
cd revanced-manager
43-
gh repo set-default "${{ github.repository }}"
44-
gh pr checkout "${{ inputs.pr-number }}"
45-
46-
echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
47-
48-
- name: Checkout
50+
- name: Checkout PR
4951
uses: actions/checkout@v4
5052
with:
51-
persist-credentials: false
53+
ref: refs/pull/${{ inputs.pr-number }}/merge
5254
fetch-depth: 0
5355

54-
- name: Cache Gradle
55-
uses: burrunan/gradle-cache-action@v2
56-
5756
- name: Setup Java
58-
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
57+
uses: actions/setup-java@v4
58+
with:
59+
distribution: 'temurin'
60+
java-version: '17'
5961

6062
- name: Set up Flutter
6163
uses: subosito/flutter-action@v2
6264
with:
63-
channel: "stable"
64-
flutter-version: 3.24.x
65-
cache: ${{ inputs.flutter-cache }}
65+
channel: ${{ inputs.flutter-channel }}
66+
flutter-version: ${{ inputs.flutter-version }}
6667

6768
- name: Get dependencies
69+
continue-on-error: true
6870
run: flutter pub get
6971

7072
- name: Generate translations
73+
continue-on-error: true
7174
run: dart run slang
7275

7376
- name: Generate code files
77+
continue-on-error: true
7478
run: dart run build_runner build --delete-conflicting-outputs
7579

7680
- name: Build
7781
continue-on-error: true
7882
id: flutter-build
79-
env:
83+
run: flutter build apk --${{ inputs.app-flavor }}
84+
env:
8085
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81-
run: |
82-
flutter build apk --"${{ inputs.app-flavour }}";
8386

8487
- name: Prepare comment
88+
id: prepare-comment # This should work now?
8589
run: |
90+
echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
8691
if [[ "${{ steps.flutter-build.outcome }}" == "success" ]]; then
87-
echo "MESSAGE=✅ Succeeded build on ${{ env.COMMIT_HASH }}." >> $GITHUB_ENV
92+
MESSAGE="✅ Succeeded build on $COMMIT_HASH."
8893
else
89-
echo "MESSAGE=🚫 Failed build on ${{ env.COMMIT_HASH }}." >> $GITHUB_ENV
94+
MESSAGE="🚫 Failed build on $COMMIT_HASH."
9095
fi
9196
9297
- name: "Comment on pull request #${{ inputs.pr-number }}"
93-
uses: thollander/actions-comment-pull-request@v2
98+
uses: thollander/actions-comment-pull-request@v3
9499
with:
95-
GITHUB_TOKEN: ${{ github.token }}
96-
pr_number: ${{ inputs.pr-number }}
100+
github-token: ${{ github.token }}
101+
pr-number: ${{ inputs.pr-number }}
97102
mode: recreate
103+
comment-tag: execution
98104
message: |
99105
## ⚒️ Build status
100-
101-
${{ env.MESSAGE }}
102-
103-
Details: [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})!
104106
105-
### ⚙️ Workflow run configuration
107+
🧪 Workflow triggered by: ${{ github.actor }}
108+
109+
${{ steps.prepare-comment.outputs.MESSAGE }}
110+
111+
Details: [_Job execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**_](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})!
112+
113+
### ⚙️ Workflow Steps
114+
115+
| Step | Status |
116+
| :------------------------ | :------------------------------------------------------- |
117+
| **Get dependencies** | ${{ steps.get-dependencies.outcome || job.status }} |
118+
| **Generate translations** | ${{ steps.generate-translations.outcome || job.status }} |
119+
| **Generate code files** | ${{ steps.generate-code-files.outcome || job.status }} |
120+
| **Build** | ${{ steps.flutter-build.outcome }} |
121+
122+
### ⚙️ Workflow Configuration
106123
107-
- Flutter cache: ${{ inputs.flutter-cache }}
108-
- App flavor: ${{ inputs.app-flavour }}
124+
| Parameter | Value |
125+
| :--------------- | :--------------------------------------- |
126+
| App flavor | ${{ inputs.app-flavor }} |
127+
| Flutter version | ${{ inputs.flutter-version }} |
128+
| Flutter channel | ${{ inputs.flutter-channel }} |
109129
110-
- name: Upload
130+
- name: Upload Artifact
131+
if: steps.flutter-build.outcome == 'success'
111132
uses: actions/upload-artifact@v4
112133
with:
113-
if-no-files-found: error
114-
name: revanced-manager-(${{ env.COMMIT_HASH }}-${{ inputs.pr-number }}-${{ inputs.app-flavour }})
134+
name: revanced-manager-(${{ env.COMMIT_HASH }}-${{ inputs.pr-number }}-${{ inputs.app-flavor }}-${{ inputs.flutter-version }})
115135
path: |
116-
build/app/outputs/flutter-apk/app-${{ inputs.app-flavour }}.apk
117-
build/app/outputs/flutter-apk/app-${{ inputs.app-flavour }}.apk.sha1
136+
build/app/outputs/flutter-apk/app-${{ inputs.app-flavor }}.apk
137+
build/app/outputs/flutter-apk/app-${{ inputs.app-flavor }}.apk.sha1

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
release:
1818
name: Release
1919
permissions:
20-
contents: write
20+
id-token: write
21+
contents: write
22+
attestations: write
2123
runs-on: ubuntu-latest
2224
steps:
2325
- name: Checkout
@@ -63,3 +65,9 @@ jobs:
6365
KEYSTORE_ENTRY_PASSWORD: ${{ secrets.KEYSTORE_ENTRY_PASSWORD }}
6466
run: |
6567
npx semantic-release
68+
69+
- name: Generate artifact attestation
70+
if: github.ref == 'refs/heads/main'
71+
uses: actions/attest-build-provenance@v1
72+
with:
73+
subject-path: build/app/outputs/apk/release/revanced-manager-*.apk

.github/workflows/sync_crowdin.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
uses: subosito/flutter-action@v2
2626
with:
2727
cache: true
28-
flutter-version: 3.27.x
2928

3029
- name: Sync translations from Crowdin
3130
uses: crowdin/github-action@v2
@@ -59,13 +58,13 @@ jobs:
5958
dart run slang analyze
6059
dart run slang clean
6160
dart run slang normalize
61+
62+
dart run slang
6263
6364
cd assets/i18n
6465
dart nuke.dart >> $GITHUB_STEP_SUMMARY
6566
cd ../..
6667
67-
dart run slang
68-
6968
flutter analyze lib/gen/strings.g.dart --no-fatal-infos --no-fatal-warnings
7069
7170
- name: Commit translations

analysis_options.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ linter:
139139
- unnecessary_string_interpolations
140140
- unnecessary_this
141141
- unrelated_type_equality_checks
142-
- unsafe_html
143142
- use_build_context_synchronously
144143
- use_full_hex_values_for_flutter_colors
145144
- use_function_type_syntax_for_parameters

android/app/build.gradle.kts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ plugins {
88
android {
99
namespace = "app.revanced.manager.flutter"
1010
compileSdk = 35
11-
ndkVersion = "27.0.12077973"
1211

1312
compileOptions {
1413
isCoreLibraryDesugaringEnabled = true
@@ -46,7 +45,7 @@ android {
4645

4746
signingConfig = signingConfigs["debug"]
4847

49-
ndk.abiFilters += setOf("armeabi-v7a", "arm64-v8a", "x86_64")
48+
ndk.abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86_64")
5049
}
5150

5251
release {
@@ -64,19 +63,22 @@ android {
6463

6564
resValue("string", "app_name", "ReVanced Manager")
6665
} else {
67-
applicationIdSuffix = ".debug"
68-
66+
applicationIdSuffix = ".development"
67+
resValue("string", "app_name", "ReVanced Manager (Development)")
6968
signingConfig = signingConfigs["debug"]
70-
71-
resValue("string", "app_name", "ReVanced Manager (Debug signed)")
7269
}
7370
}
7471

7572
debug {
7673
applicationIdSuffix = ".debug"
77-
7874
resValue("string", "app_name", "ReVanced Manager (Debug)")
7975
}
76+
77+
named("profile") {
78+
initWith(getByName("debug"))
79+
applicationIdSuffix = ".profile"
80+
resValue("string", "app_name", "ReVanced Manager (Profile)")
81+
}
8082
}
8183

8284
packaging {
@@ -91,7 +93,6 @@ android {
9193
}
9294
}
9395

94-
9596
flutter {
9697
source = "../.."
9798
}
@@ -101,4 +102,3 @@ dependencies {
101102
implementation(libs.revanced.patcher)
102103
implementation(libs.revanced.library)
103104
}
104-

android/gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
revanced-patcher = "21.0.0"
3-
revanced-library = "3.0.2"
4-
desugar_jdk_libs = "2.1.3"
3+
revanced-library = "3.1.0"
4+
desugar_jdk_libs = "2.1.4"
55

66
[libraries]
77
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3+
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

android/settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ pluginManagement {
1717

1818
plugins {
1919
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
20-
id("com.android.application") version "8.7.2" apply false
21-
id("org.jetbrains.kotlin.android") version "2.0.20" apply false
20+
id("com.android.application") version "8.9.0" apply false
21+
id("org.jetbrains.kotlin.android") version "2.1.10" apply false
2222
}
2323

2424
include(":app")

lib/ui/widgets/settingsView/about_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class _AboutWidgetState extends State<AboutWidget> {
2828
ClipboardData(
2929
text: 'Version: ${snapshot.data!['version']}\n'
3030
'Model: ${snapshot.data!['model']}\n'
31-
'Android Version: ${snapshot.data!['androidVersion']}\n'
31+
'Android version: ${snapshot.data!['androidVersion']}\n'
3232
'${snapshot.data!['supportedArch'].length > 1 ? 'Supported Archs' : 'Supported Arch'}: ${snapshot.data!['supportedArch'].join(", ")}\n',
3333
),
3434
);

lib/utils/about_info.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ class AboutInfo {
66
static Future<Map<String, dynamic>> getInfo() async {
77
final packageInfo = await PackageInfo.fromPlatform();
88
final info = await DeviceInfoPlugin().androidInfo;
9+
const buildFlavor =
10+
kReleaseMode ? 'release' : (kProfileMode ? 'profile' : 'debug');
11+
912
return {
1013
'version': packageInfo.version,
11-
'flavor': kReleaseMode ? 'release' : 'debug',
14+
'flavor': buildFlavor,
1215
'model': info.model,
1316
'androidVersion': info.version.release,
1417
'supportedArch': info.supportedAbis,

0 commit comments

Comments
 (0)