Skip to content

Commit d0fe579

Browse files
authored
chore: Merge branch dev to main (#2149)
2 parents 2f46b3c + 4dcdc57 commit d0fe579

File tree

65 files changed

+1389
-533
lines changed

Some content is hidden

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

65 files changed

+1389
-533
lines changed

.github/dependabot.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,29 @@ updates:
66
target-branch: dev
77
schedule:
88
interval: monthly
9+
groups:
10+
gh-actions:
11+
applies-to: version-updates
12+
patterns:
13+
- "*"
14+
update-types:
15+
- "minor"
16+
- "patch"
917

1018
- package-ecosystem: npm
1119
labels: []
1220
directory: /
1321
target-branch: dev
1422
schedule:
1523
interval: monthly
24+
groups:
25+
npm:
26+
applies-to: version-updates
27+
patterns:
28+
- "*"
29+
update-types:
30+
- "minor"
31+
- "patch"
1632

1733
# ReVanced Manager Flutter
1834
- package-ecosystem: pub
@@ -21,13 +37,29 @@ updates:
2137
target-branch: dev
2238
schedule:
2339
interval: monthly
40+
groups:
41+
pubspec:
42+
applies-to: version-updates
43+
patterns:
44+
- "*"
45+
update-types:
46+
- "minor"
47+
- "patch"
2448

2549
- package-ecosystem: gradle
2650
labels: []
27-
directory: /
51+
directory: /android
2852
target-branch: dev
2953
schedule:
3054
interval: monthly
55+
groups:
56+
gradle:
57+
applies-to: version-updates
58+
patterns:
59+
- "*"
60+
update-types:
61+
- "minor"
62+
- "patch"
3163

3264
# ReVanced Manager Compose
3365
- package-ecosystem: gradle
@@ -36,3 +68,11 @@ updates:
3668
target-branch: compose-dev
3769
schedule:
3870
interval: monthly
71+
groups:
72+
gradle-compose:
73+
applies-to: version-updates
74+
patterns:
75+
- "*"
76+
update-types:
77+
- "minor"
78+
- "patch"

.github/workflows/build_pull_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
fetch-depth: 0
5353

5454
- name: Cache Gradle
55-
uses: burrunan/gradle-cache-action@v1
55+
uses: burrunan/gradle-cache-action@v2
5656

5757
- name: Setup Java
5858
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
@@ -61,7 +61,7 @@ jobs:
6161
uses: subosito/flutter-action@v2
6262
with:
6363
channel: "stable"
64-
flutter-version: 3.22.x
64+
flutter-version: 3.24.x
6565
cache: ${{ inputs.flutter-cache }}
6666

6767
- name: Get dependencies

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: subosito/flutter-action@v2
3737
with:
3838
channel: "stable"
39-
flutter-version: 3.22.x
39+
flutter-version: 3.24.x
4040

4141
- name: Install dependencies
4242
run: npm ci

.github/workflows/sync_crowdin.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: subosito/flutter-action@v2
2626
with:
2727
cache: true
28-
flutter-version: 3.22.x
28+
flutter-version: 3.24.x
2929

3030
- name: Sync translations from Crowdin
3131
uses: crowdin/github-action@v1
@@ -47,20 +47,20 @@ jobs:
4747
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
4848
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
4949

50-
- name: Generate Translation Strings
50+
# There has to be a better way to do this
51+
- name: Normalization of Translation Strings
5152
run: |
5253
dart pub get
53-
dart run slang
54-
flutter analyze lib/gen/strings.g.dart --no-fatal-infos --no-fatal-warnings
55-
56-
- name: Remove empty values & Validation of Translation Strings
57-
run: |
54+
cd assets/i18n
55+
sudo chmod 766 *.json
56+
cd ../..
5857
dart run slang analyze
5958
dart run slang clean
6059
dart run slang normalize
6160
cd assets/i18n
62-
sudo chmod 777 *.json
6361
dart nuke.dart >> $GITHUB_STEP_SUMMARY
62+
cd ../..
63+
dart run slang
6464
flutter analyze lib/gen/strings.g.dart --no-fatal-infos --no-fatal-warnings
6565
6666
- name: Commit translations

analysis_options.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ linter:
7070
- implementation_imports
7171
- collection_methods_unrelated_type
7272
- leading_newlines_in_multiline_strings
73-
- library_names
7473
- library_prefixes
7574
- library_private_types_in_public_api
7675
- missing_whitespace_between_adjacent_strings
@@ -84,7 +83,6 @@ linter:
8483
- overridden_fields
8584
- package_api_docs
8685
- package_names
87-
- package_prefixed_library_names
8886
- prefer_adjacent_string_concatenation
8987
- prefer_asserts_in_initializer_lists
9088
- prefer_collection_literals
@@ -110,13 +108,11 @@ linter:
110108
- prefer_is_not_empty
111109
- prefer_is_not_operator
112110
- prefer_iterable_whereType
113-
- prefer_mixin # Has false positives, see https://github.com/dart-lang/linter/issues/3018
114111
- prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere
115112
- prefer_null_aware_operators
116113
- prefer_single_quotes
117114
- prefer_spread_collections
118115
- prefer_typing_uninitialized_variables
119-
- prefer_void_to_null
120116
- provide_deprecation_message
121117
- recursive_getters
122118
- sized_box_for_whitespace

android/app/build.gradle

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,17 @@ android {
4444
versionName flutterVersionName
4545
}
4646
buildTypes {
47-
release {
47+
configureEach {
48+
shrinkResources = false
49+
minifyEnabled = false
50+
signingConfig signingConfigs.debug
4851
ndk {
4952
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
5053
}
54+
}
55+
release {
56+
shrinkResources true
57+
minifyEnabled true
5158
if (System.getenv("signingKey") != null) {
5259
signingConfigs {
5360
create("release") {
@@ -66,29 +73,17 @@ android {
6673
}
6774
} else {
6875
signingConfig = signingConfigs.debug
69-
resValue "string", "app_name", "ReVanced Manager Debug"
76+
resValue "string", "app_name", "ReVanced Manager (Debug)"
7077
applicationIdSuffix ".debug"
7178
}
7279
}
7380
debug {
74-
shrinkResources false
75-
minifyEnabled false
76-
resValue "string", "app_name", "ReVanced Manager Debug"
81+
resValue "string", "app_name", "ReVanced Manager (Debug)"
7782
applicationIdSuffix ".debug"
78-
signingConfig signingConfigs.debug
79-
ndk {
80-
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
81-
}
8283
}
8384
profile {
84-
shrinkResources false
85-
minifyEnabled false
86-
resValue "string", "app_name", "ReVanced Manager Profile"
85+
resValue "string", "app_name", "ReVanced Manager (Profile)"
8786
applicationIdSuffix ".profile"
88-
signingConfig signingConfigs.debug
89-
ndk {
90-
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
91-
}
9287
}
9388
}
9489
packagingOptions {

android/app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
<category android:name="android.intent.category.LAUNCHER" />
4545
</intent-filter>
4646
</activity>
47+
<service
48+
android:name="de.julianassmann.flutter_background.IsolateHolderService"
49+
android:exported="false"
50+
android:foregroundServiceType="shortService" />
4751
<activity
4852
android:name=".ExportSettingsActivity"
4953
android:exported="true">

android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,13 @@ class MainActivity : FlutterActivity() {
109109

110110
"getPatches" -> {
111111
val patchBundleFilePath = call.argument<String>("patchBundleFilePath")!!
112-
val cacheDirPath = call.argument<String>("cacheDirPath")!!
113112

114113
try {
115114
val patchBundleFile = File(patchBundleFilePath)
116115
patchBundleFile.setWritable(false)
117116
patches = PatchBundleLoader.Dex(
118117
patchBundleFile,
119-
optimizedDexDirectory = File(cacheDirPath)
118+
optimizedDexDirectory = codeCacheDir
120119
)
121120
} catch (ex: Exception) {
122121
return@setMethodCallHandler result.notImplemented()
@@ -365,6 +364,9 @@ class MainActivity : FlutterActivity() {
365364
"An error occurred:\n$stack"
366365
)
367366
}
367+
} finally {
368+
inFile.delete()
369+
tmpDir.deleteRecursively()
368370
}
369371

370372
handler.post { result.success(null) }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:tools="http://schemas.android.com/tools"
3+
tools:keep="@drawable/ic_notification" />

android/build.gradle

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,32 @@ allprojects {
1515
}
1616

1717
rootProject.buildDir = '../build'
18+
// TODO: Bump SDK
19+
// Reference: https://github.com/flutter/flutter/issues/153281#issuecomment-2292201697
1820
subprojects {
21+
afterEvaluate { project ->
22+
if (project.extensions.findByName("android") != null) {
23+
Integer pluginCompileSdk = project.android.compileSdk
24+
if (pluginCompileSdk != null && pluginCompileSdk < 31) {
25+
project.logger.error(
26+
"Warning: Overriding compileSdk version in Flutter plugin: "
27+
+ project.name
28+
+ " from "
29+
+ pluginCompileSdk
30+
+ " to 31 (to work around https://issuetracker.google.com/issues/199180389)."
31+
+ "\nIf there is not a new version of " + project.name + ", consider filing an issue against "
32+
+ project.name
33+
+ " to increase their compileSdk to the latest (otherwise try updating to the latest version)."
34+
)
35+
project.android {
36+
compileSdk 31
37+
}
38+
}
39+
}
40+
}
41+
1942
project.buildDir = "${rootProject.buildDir}/${project.name}"
20-
}
21-
subprojects {
22-
project.evaluationDependsOn(':app')
43+
project.evaluationDependsOn(":app")
2344
}
2445

2546
tasks.register("clean", Delete) {

0 commit comments

Comments
 (0)