Skip to content

Commit

Permalink
chore: Merge branch dev to main (#2149)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ushie authored Sep 9, 2024
2 parents 2f46b3c + 4dcdc57 commit d0fe579
Show file tree
Hide file tree
Showing 65 changed files with 1,389 additions and 533 deletions.
42 changes: 41 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,29 @@ updates:
target-branch: dev
schedule:
interval: monthly
groups:
gh-actions:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"

- package-ecosystem: npm
labels: []
directory: /
target-branch: dev
schedule:
interval: monthly
groups:
npm:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"

# ReVanced Manager Flutter
- package-ecosystem: pub
Expand All @@ -21,13 +37,29 @@ updates:
target-branch: dev
schedule:
interval: monthly
groups:
pubspec:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"

- package-ecosystem: gradle
labels: []
directory: /
directory: /android
target-branch: dev
schedule:
interval: monthly
groups:
gradle:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"

# ReVanced Manager Compose
- package-ecosystem: gradle
Expand All @@ -36,3 +68,11 @@ updates:
target-branch: compose-dev
schedule:
interval: monthly
groups:
gradle-compose:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"
4 changes: 2 additions & 2 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
fetch-depth: 0

- name: Cache Gradle
uses: burrunan/gradle-cache-action@v1
uses: burrunan/gradle-cache-action@v2

- name: Setup Java
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
Expand All @@ -61,7 +61,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: 3.22.x
flutter-version: 3.24.x
cache: ${{ inputs.flutter-cache }}

- name: Get dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: 3.22.x
flutter-version: 3.24.x

- name: Install dependencies
run: npm ci
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/sync_crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
cache: true
flutter-version: 3.22.x
flutter-version: 3.24.x

- name: Sync translations from Crowdin
uses: crowdin/github-action@v1
Expand All @@ -47,20 +47,20 @@ jobs:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

- name: Generate Translation Strings
# There has to be a better way to do this
- name: Normalization of Translation Strings
run: |
dart pub get
dart run slang
flutter analyze lib/gen/strings.g.dart --no-fatal-infos --no-fatal-warnings
- name: Remove empty values & Validation of Translation Strings
run: |
cd assets/i18n
sudo chmod 766 *.json
cd ../..
dart run slang analyze
dart run slang clean
dart run slang normalize
cd assets/i18n
sudo chmod 777 *.json
dart nuke.dart >> $GITHUB_STEP_SUMMARY
cd ../..
dart run slang
flutter analyze lib/gen/strings.g.dart --no-fatal-infos --no-fatal-warnings
- name: Commit translations
Expand Down
4 changes: 0 additions & 4 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ linter:
- implementation_imports
- collection_methods_unrelated_type
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- library_private_types_in_public_api
- missing_whitespace_between_adjacent_strings
Expand All @@ -84,7 +83,6 @@ linter:
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_adjacent_string_concatenation
- prefer_asserts_in_initializer_lists
- prefer_collection_literals
Expand All @@ -110,13 +108,11 @@ linter:
- prefer_is_not_empty
- prefer_is_not_operator
- prefer_iterable_whereType
- prefer_mixin # Has false positives, see https://github.com/dart-lang/linter/issues/3018
- prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere
- prefer_null_aware_operators
- prefer_single_quotes
- prefer_spread_collections
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- provide_deprecation_message
- recursive_getters
- sized_box_for_whitespace
Expand Down
27 changes: 11 additions & 16 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,17 @@ android {
versionName flutterVersionName
}
buildTypes {
release {
configureEach {
shrinkResources = false
minifyEnabled = false
signingConfig signingConfigs.debug
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
release {
shrinkResources true
minifyEnabled true
if (System.getenv("signingKey") != null) {
signingConfigs {
create("release") {
Expand All @@ -66,29 +73,17 @@ android {
}
} else {
signingConfig = signingConfigs.debug
resValue "string", "app_name", "ReVanced Manager Debug"
resValue "string", "app_name", "ReVanced Manager (Debug)"
applicationIdSuffix ".debug"
}
}
debug {
shrinkResources false
minifyEnabled false
resValue "string", "app_name", "ReVanced Manager Debug"
resValue "string", "app_name", "ReVanced Manager (Debug)"
applicationIdSuffix ".debug"
signingConfig signingConfigs.debug
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
profile {
shrinkResources false
minifyEnabled false
resValue "string", "app_name", "ReVanced Manager Profile"
resValue "string", "app_name", "ReVanced Manager (Profile)"
applicationIdSuffix ".profile"
signingConfig signingConfigs.debug
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
}
packagingOptions {
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name="de.julianassmann.flutter_background.IsolateHolderService"
android:exported="false"
android:foregroundServiceType="shortService" />
<activity
android:name=".ExportSettingsActivity"
android:exported="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,13 @@ class MainActivity : FlutterActivity() {

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

try {
val patchBundleFile = File(patchBundleFilePath)
patchBundleFile.setWritable(false)
patches = PatchBundleLoader.Dex(
patchBundleFile,
optimizedDexDirectory = File(cacheDirPath)
optimizedDexDirectory = codeCacheDir
)
} catch (ex: Exception) {
return@setMethodCallHandler result.notImplemented()
Expand Down Expand Up @@ -365,6 +364,9 @@ class MainActivity : FlutterActivity() {
"An error occurred:\n$stack"
)
}
} finally {
inFile.delete()
tmpDir.deleteRecursively()
}

handler.post { result.success(null) }
Expand Down
3 changes: 3 additions & 0 deletions android/app/src/main/res/raw/revanced_manager_keep.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@drawable/ic_notification" />
27 changes: 24 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,32 @@ allprojects {
}

rootProject.buildDir = '../build'
// TODO: Bump SDK
// Reference: https://github.com/flutter/flutter/issues/153281#issuecomment-2292201697
subprojects {
afterEvaluate { project ->
if (project.extensions.findByName("android") != null) {
Integer pluginCompileSdk = project.android.compileSdk
if (pluginCompileSdk != null && pluginCompileSdk < 31) {
project.logger.error(
"Warning: Overriding compileSdk version in Flutter plugin: "
+ project.name
+ " from "
+ pluginCompileSdk
+ " to 31 (to work around https://issuetracker.google.com/issues/199180389)."
+ "\nIf there is not a new version of " + project.name + ", consider filing an issue against "
+ project.name
+ " to increase their compileSdk to the latest (otherwise try updating to the latest version)."
)
project.android {
compileSdk 31
}
}
}
}

project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
project.evaluationDependsOn(":app")
}

tasks.register("clean", Delete) {
Expand Down
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion assets/i18n/strings.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
"status_failure_timeout_description": "The installation took too long to finish.\n\nWould you like to try again?",
"status_failure_storage_description": "The installation failed due to insufficient storage.\n\nFree up some space and try again.",
"status_failure_invalid_description": "The installation failed due to the patched app being invalid.\n\nUninstall the app and try again?",
"status_failure_incompatible_description": "The app is incompatible with this device.\n\nContact the developer of the app and ask for support.",
"status_failure_incompatible_description": "The app is incompatible with this device.\n\nUse an APK that is supported by this device and try again.",
"status_failure_conflict_description": "The installation was prevented by an existing installation of the app.\n\nUninstall the installed app and try again?",
"status_failure_blocked_description": "The installation was blocked by ${packageName}.\n\nAdjust your security settings and try again.",
"install_failed_verification_failure_description": "The installation failed due to a verification issue.\n\nAdjust your security settings and try again.",
Expand Down
8 changes: 7 additions & 1 deletion assets/i18n/strings_ar_SA.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"widgetTitle": "لوحة التحكم",
"updatesSubtitle": "تحديثات",
"lastPatchedAppSubtitle": "آخر تطبيق تم تعديله",
"patchedSubtitle": "التطبيقات المثبتة",
"changeLaterSubtitle": "يمكنك تغيير هذا في الإعدادات في وقت لاحق.",
"noSavedAppFound": "لم يتم العثور على تطبيق",
"noInstallations": "لا توجد تطبيقات معدلة مثبتة",
Expand Down Expand Up @@ -53,6 +54,7 @@
"patcherView": {
"widgetTitle": "المُعَّدِّل",
"patchButton": "تعديل",
"incompatibleArchWarningDialogText": "لم يتم دعم التعديلات الخاصة بهذه البنية حتى الآن وقد تفشل. هل تريد المتابعة على أي حال؟",
"removedPatchesWarningDialogText": "تم إزالة التعديلات التالية منذ آخر مرة استخدمتها فيها.\n\n${patches}\n\nتابع على أي حال؟",
"requiredOptionDialogText": "يجب ضبط بعض خيارات التعديل."
},
Expand Down Expand Up @@ -103,11 +105,14 @@
"patchOptionsView": {
"customValue": "تخصيص القيمة",
"setToNull": "تعيين إلى ملغي",
"nullValue": "قيمة هذا الخيار فارغة حاليًا",
"viewTitle": "خيارات التعديل",
"saveOptions": "حفظ",
"unselectPatch": "إلغاء تحديد التعديل",
"tooltip": "المزيد من خيارات الإدخال",
"selectFilePath": "تحديد مسار الملف",
"selectFolder": "تحديد مجلد",
"requiredOption": "إعداد هذا الخيار مطلوب",
"unsupportedOption": "هذا الخيار غير مدعوم",
"requiredOptionNull": "يجب تعيين الخيارات التالية:\n\n${options}"
},
Expand Down Expand Up @@ -180,6 +185,7 @@
"showUpdateDialogHint": "عرض مربع حوار عندما يتوفر تحديث جديد",
"universalPatchesLabel": "عرض التعديلات العامة",
"universalPatchesHint": "عرض جميع التطبيقات والتعديلات العامة (قد تؤدي إلى إبطاء قائمة التطبيقات)",
"lastPatchedAppLabel": "حفظ التطبيق المعدل",
"lastPatchedAppHint": "حفظ آخر تعديل لتثبيته أو تصديره لاحقًا",
"versionCompatibilityCheckLabel": "التحقق من توافق الإصدار",
"versionCompatibilityCheckHint": "منع تحديد التعديلات غير المتوافقة مع إصدار التطبيق المحدد",
Expand Down Expand Up @@ -277,7 +283,7 @@
"status_failure_timeout_description": "استغرق التثبيت وقتا طويلا للانتهاء.\n\nهل تود أن تجرب مجددا؟",
"status_failure_storage_description": "فشل التثبيت بسبب عدم كفاية مساحة التخزين.\n\nقم بتحرير بعض المساحة وحاول مرة أخرى.",
"status_failure_invalid_description": "فشل التثبيت نظرًا لأن التطبيق المعدل غير صالح.\n\nهل تريد إلغاء تثبيت التطبيق والمحاولة مرة أخرى؟",
"status_failure_incompatible_description": "التطبيق غير متوافق مع هذا الجهاز.\n\nاتصل بمطور التطبيق واطلب الدعم.",
"status_failure_incompatible_description": "التطبيق غير متوافق مع هذا الجهاز.\n\nاستخدم ملف APK متوافق مع هذا الجهاز وحاول مجددًا.",
"status_failure_conflict_description": "تم منع التثبيت من خلال تثبيت موجود للتطبيق.\n\nهل ترغب في إلغاء تثبيت التطبيق المثبت والمحاولة مرة أخرى؟",
"status_failure_blocked_description": "تم حظر التثبيت بواسطة ${packageName}.\n\nاضبط إعدادات الأمان الخاصة بك وحاول مرة أخرى.",
"install_failed_verification_failure_description": "فشل التثبيت بسبب مشكلة التحقق.\n\nاضبط إعدادات الأمان وحاول مرة أخرى.",
Expand Down
Loading

0 comments on commit d0fe579

Please sign in to comment.