Skip to content

Commit c45d579

Browse files
authored
chore: Merge branch dev to main (#2468)
2 parents a8e192b + b6b8f4e commit c45d579

Some content is hidden

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

68 files changed

+1447
-1342
lines changed

.github/workflows/build_pull_request.yml

Lines changed: 14 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,18 @@ name: Build pull request
33
on:
44
workflow_dispatch:
55
inputs:
6-
# Select pull request
76
pr-number:
8-
description: PR number (Without hashtag)
7+
description: PR number
98
required: true
10-
# Select app flavor
119
app-flavor:
1210
description: App flavor
13-
default: 'release'
11+
default: release
1412
type: choice
1513
options:
1614
- release
1715
- debug
1816
- profile
1917

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'
39-
40-
run-name: "Build pull request ${{ inputs.pr-number }}"
41-
4218
jobs:
4319
build:
4420
name: Build
@@ -62,76 +38,34 @@ jobs:
6238
- name: Set up Flutter
6339
uses: subosito/flutter-action@v2
6440
with:
65-
channel: ${{ inputs.flutter-channel }}
66-
flutter-version: ${{ inputs.flutter-version }}
67-
41+
channel: stable
42+
flutter-version: 3.29.x
43+
cache: true
44+
45+
- name: Cache Gradle
46+
uses: burrunan/gradle-cache-action@v3
47+
with:
48+
build-root-directory: ${{ github.workspace }}/android
49+
6850
- name: Get dependencies
69-
continue-on-error: true
7051
run: flutter pub get
7152

7253
- name: Generate translations
73-
continue-on-error: true
7454
run: dart run slang
7555

7656
- name: Generate code files
77-
continue-on-error: true
7857
run: dart run build_runner build --delete-conflicting-outputs
7958

8059
- name: Build
81-
continue-on-error: true
8260
id: flutter-build
8361
run: flutter build apk --${{ inputs.app-flavor }}
8462
env:
8563
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8664

87-
- name: Prepare comment
88-
id: prepare-comment # This should work now?
89-
run: |
90-
echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
91-
if [[ "${{ steps.flutter-build.outcome }}" == "success" ]]; then
92-
MESSAGE="✅ Succeeded build on $COMMIT_HASH."
93-
else
94-
MESSAGE="🚫 Failed build on $COMMIT_HASH."
95-
fi
96-
97-
- name: "Comment on pull request #${{ inputs.pr-number }}"
98-
uses: thollander/actions-comment-pull-request@v3
99-
with:
100-
github-token: ${{ github.token }}
101-
pr-number: ${{ inputs.pr-number }}
102-
mode: recreate
103-
comment-tag: execution
104-
message: |
105-
## ⚒️ Build status
106-
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
123-
124-
| Parameter | Value |
125-
| :--------------- | :--------------------------------------- |
126-
| App flavor | ${{ inputs.app-flavor }} |
127-
| Flutter version | ${{ inputs.flutter-version }} |
128-
| Flutter channel | ${{ inputs.flutter-channel }} |
129-
130-
- name: Upload Artifact
65+
- name: Upload artifacts
13166
if: steps.flutter-build.outcome == 'success'
13267
uses: actions/upload-artifact@v4
13368
with:
134-
name: revanced-manager-(${{ env.COMMIT_HASH }}-${{ inputs.pr-number }}-${{ inputs.app-flavor }}-${{ inputs.flutter-version }})
69+
name: revanced-manager-(${{ env.COMMIT_HASH }}
13570
path: |
136-
build/app/outputs/flutter-apk/app-${{ inputs.app-flavor }}.apk
137-
build/app/outputs/flutter-apk/app-${{ inputs.app-flavor }}.apk.sha1
71+
build/app/outputs/flutter-apk/app-*.apk

.github/workflows/open_pull_request.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ env:
1212
jobs:
1313
pull-request:
1414
name: Open pull request
15+
permissions:
16+
pull-requests: write
1517
runs-on: ubuntu-latest
1618
steps:
1719
- name: Checkout
@@ -25,4 +27,3 @@ jobs:
2527
pr_body: |
2628
This pull request will ${{ env.MESSAGE }}.
2729
pr_draft: true
28-
github_token: ${{ secrets.REPOSITORY_PUSH_ACCESS }}

.github/workflows/release.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@ on:
66
branches:
77
- main
88
- dev
9-
paths:
10-
- ".github/workflows/release.yml"
11-
- "android/**"
12-
- "assets/**"
13-
- "lib/**"
14-
- "pubspec.yaml"
159

1610
jobs:
1711
release:
1812
name: Release
1913
permissions:
20-
id-token: write
2114
contents: write
15+
id-token: write
2216
attestations: write
2317
runs-on: ubuntu-latest
2418
steps:
@@ -28,7 +22,10 @@ jobs:
2822
fetch-depth: 0
2923

3024
- name: Setup Java
31-
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
25+
uses: actions/setup-java@v4
26+
with:
27+
distribution: 'temurin'
28+
java-version: '17'
3229

3330
- name: Setup Node.js
3431
uses: actions/setup-node@v4
@@ -40,9 +37,16 @@ jobs:
4037
uses: subosito/flutter-action@v2
4138
with:
4239
channel: stable
40+
flutter-version: 3.29.x
41+
cache: true
42+
43+
- name: Cache Gradle
44+
uses: burrunan/gradle-cache-action@v3
45+
with:
46+
build-root-directory: ${{ github.workspace }}/android
4347

4448
- name: Install dependencies
45-
run: npm ci
49+
run: npm i
4650

4751
- name: Get dependencies
4852
run: flutter pub get
@@ -57,17 +61,17 @@ jobs:
5761
run: |
5862
echo "${{ secrets.KEYSTORE }}" | base64 --decode > "android/app/keystore.jks"
5963
60-
- name: Release
64+
- name: Semantic Release
65+
uses: cycjimmy/semantic-release-action@v4
66+
id: semantic
6167
env:
6268
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6369
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
6470
KEYSTORE_ENTRY_ALIAS: ${{ secrets.KEYSTORE_ENTRY_ALIAS }}
6571
KEYSTORE_ENTRY_PASSWORD: ${{ secrets.KEYSTORE_ENTRY_PASSWORD }}
66-
run: |
67-
npx semantic-release
6872

69-
- name: Generate artifact attestation
70-
if: github.ref == 'refs/heads/main'
71-
uses: actions/attest-build-provenance@v1
73+
- name: Attest
74+
if: steps.semantic.outputs.new_release_published == 'true'
75+
uses: actions/attest-build-provenance@v2
7276
with:
7377
subject-path: build/app/outputs/apk/release/revanced-manager-*.apk

.github/workflows/sync_crowdin.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,22 @@ jobs:
1515
sync:
1616
name: Sync
1717
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: write
1821
steps:
1922
- name: Checkout
2023
uses: actions/checkout@v4
2124
with:
25+
ref: dev
2226
fetch-depth: 0
27+
clean: true
2328

2429
- name: Setup Flutter
2530
uses: subosito/flutter-action@v2
2631
with:
32+
channel: stable
33+
flutter-version: 3.29.x
2734
cache: true
2835

2936
- name: Sync translations from Crowdin
@@ -34,15 +41,14 @@ jobs:
3441
upload_translations: false
3542
download_translations: true
3643
localization_branch_name: feat/translations
44+
skip_ref_checkout: true
3745
create_pull_request: true
3846
pull_request_title: "chore: Sync translations"
3947
pull_request_body: "Sync translations from [crowdin.com/project/revanced](https://crowdin.com/project/revanced)"
4048
pull_request_base_branch_name: "dev"
4149
commit_message: "chore: Sync translations"
42-
github_user_name: revanced-bot
43-
github_user_email: [email protected]
4450
env:
45-
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4652
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
4753
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
4854

@@ -69,8 +75,8 @@ jobs:
6975
7076
- name: Commit translations
7177
run: |
72-
git config user.name revanced-bot
73-
git config user.email github@revanced.app
78+
git config --global user.name 'github-actions[bot]'
79+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
7480
sudo chown -R $USER:$USER .git
7581
git commit -m "chore: Remove empty values from JSON" assets/i18n/*.i18n.json
7682
git push origin HEAD:feat/translations

.gitignore

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,58 @@
11
# Miscellaneous
22
*.class
3+
*.lock
34
*.log
45
*.pyc
56
*.swp
6-
.DS_Store
7-
.atom/
87
.buildlog/
98
.history
10-
.svn/
11-
migrate_working_dir/
9+
10+
# packages file containing multi-root paths
11+
.packages.generated
1212

1313
# IntelliJ related
1414
*.iml
1515
*.ipr
1616
*.iws
1717
.idea/
1818

19-
# The .vscode folder contains launch configuration and tasks you configure in
20-
# VS Code which you may wish to be included in version control, so this line
21-
# is commented out by default.
22-
#.vscode/
23-
2419
# Flutter/Dart/Pub related
2520
**/doc/api/
26-
**/ios/Flutter/.last_build_id
2721
.dart_tool/
2822
.flutter-plugins
2923
.flutter-plugins-dependencies
30-
.pub-cache/
24+
**/generated_plugin_registrant.dart
25+
.packages
26+
.pub-preload-cache/
3127
.pub/
32-
/build/
28+
build/
29+
flutter_*.png
30+
linked_*.ds
31+
unlinked.ds
32+
unlinked_spec.ds
33+
34+
# Android related
35+
**/android/**/gradle-wrapper.jar
36+
.gradle/
37+
**/android/captures/
38+
**/android/gradlew
39+
**/android/gradlew.bat
40+
**/android/local.properties
41+
**/android/**/GeneratedPluginRegistrant.java
42+
**/android/key.properties
43+
*.jks
3344

34-
# Symbolication related
45+
# Coverage
46+
coverage/
47+
48+
# Symbols
3549
app.*.symbols
3650

3751
# Obfuscation related
3852
app.*.map.json
3953

40-
# Android Studio will place build artifacts here
41-
/android/app/debug
42-
/android/app/profile
43-
/android/app/release
44-
4554
# Generated files
55+
android/app/.cxx
4656
**/*.g.dart
4757
**/*.locator.dart
4858
**/*.router.dart

analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ analyzer:
1515
- lib/app/app.router.dart
1616
- lib/models/patch.g.dart
1717
- lib/models/patched_application.g.dart
18+
- lib/gen/
1819

1920
linter:
2021
rules:

android/app/proguard-rules.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@
1212
-dontwarn com.google.j2objc.annotations.*
1313
-dontwarn java.awt.**
1414
-dontwarn javax.**
15+
16+
# Required for Share Plus, ref: ReVanced/revanced-manager#2474
17+
-keep interface android.content.res.XmlResourceParser { *; }

android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
<meta-data
4040
android:name="io.flutter.embedding.android.NormalTheme"
4141
android:resource="@style/NormalTheme" />
42+
<meta-data
43+
android:name="io.flutter.embedding.android.EnableImpeller"
44+
android:value="false" />
4245
<intent-filter>
4346
<action android:name="android.intent.action.MAIN" />
4447
<category android:name="android.intent.category.LAUNCHER" />
-6.49 MB
Binary file not shown.

0 commit comments

Comments
 (0)