mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-11 21:56:17 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dfa0dada6 | ||
|
|
857a523f84 | ||
|
|
ceac838706 | ||
|
|
e8cb6d27fc | ||
|
|
78428f6bd3 | ||
|
|
da94dfba70 | ||
|
|
8275792f45 | ||
|
|
a90923011a | ||
|
|
1aa24e2871 |
6
.run/main.dart.run.xml
Normal file
6
.run/main.dart.run.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
|
||||
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -71,7 +71,7 @@ dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
|
||||
// ReVanced
|
||||
implementation "app.revanced:revanced-patcher:5.1.2"
|
||||
implementation "app.revanced:revanced-patcher:6.0.0"
|
||||
|
||||
// Signing & aligning
|
||||
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
||||
|
||||
@@ -13,7 +13,7 @@ import app.revanced.patcher.Patcher
|
||||
import app.revanced.patcher.PatcherOptions
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
import app.revanced.patcher.logging.Logger
|
||||
import app.revanced.patcher.util.patch.impl.DexPatchBundle
|
||||
import app.revanced.patcher.util.patch.PatchBundle
|
||||
import dalvik.system.DexClassLoader
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
@@ -100,7 +100,7 @@ class MainActivity : FlutterActivity() {
|
||||
Thread {
|
||||
try {
|
||||
val patches = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
|
||||
DexPatchBundle(
|
||||
PatchBundle.Dex(
|
||||
patchBundleFilePath,
|
||||
DexClassLoader(
|
||||
patchBundleFilePath,
|
||||
@@ -178,7 +178,7 @@ class MainActivity : FlutterActivity() {
|
||||
}
|
||||
|
||||
patcher.addPatches(patches)
|
||||
patcher.applyPatches().forEach { (patch, res) ->
|
||||
patcher.executePatches().forEach { (patch, res) ->
|
||||
if (res.isSuccess) {
|
||||
val msg = "[success] $patch"
|
||||
handler.post {
|
||||
@@ -193,7 +193,7 @@ class MainActivity : FlutterActivity() {
|
||||
}
|
||||
return@forEach
|
||||
}
|
||||
val msg = "[error] $patch:" + res.exceptionOrNull()!!
|
||||
val msg = "[error] $patch:" + res.exceptionOrNull()!!.printStackTrace()
|
||||
handler.post {
|
||||
installerChannel.invokeMethod(
|
||||
"update",
|
||||
|
||||
@@ -5,19 +5,14 @@ import 'package:dio/dio.dart';
|
||||
import 'package:dio_http_cache_lts/dio_http_cache_lts.dart';
|
||||
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||
import 'package:injectable/injectable.dart';
|
||||
import 'package:native_dio_client/native_dio_client.dart';
|
||||
import 'package:revanced_manager/models/patch.dart';
|
||||
import 'package:dio_http2_adapter/dio_http2_adapter.dart';
|
||||
|
||||
@lazySingleton
|
||||
class GithubAPI {
|
||||
final Dio _dio = Dio(
|
||||
BaseOptions(baseUrl: 'https://api.github.com'),
|
||||
)..httpClientAdapter = Http2Adapter(
|
||||
ConnectionManager(
|
||||
idleTimeout: 10000,
|
||||
onClientCreate: (_, config) => config.onBadCertificate = (_) => true,
|
||||
),
|
||||
);
|
||||
)..httpClientAdapter = NativeAdapter();
|
||||
final DioCacheManager _dioCacheManager = DioCacheManager(CacheConfig());
|
||||
final Options _cacheOptions = buildCacheOptions(
|
||||
const Duration(hours: 6),
|
||||
@@ -25,6 +20,7 @@ class GithubAPI {
|
||||
);
|
||||
final Map<String, String> repoAppPath = {
|
||||
'com.google.android.youtube': 'youtube',
|
||||
'app.revanced.android.youtube': 'youtube',
|
||||
'com.google.android.apps.youtube.music': 'music',
|
||||
'com.twitter.android': 'twitter',
|
||||
'com.reddit.frontpage': 'reddit',
|
||||
@@ -65,17 +61,20 @@ class GithubAPI {
|
||||
'/repos/$repoName/commits',
|
||||
queryParameters: {
|
||||
'path': path,
|
||||
'per_page': 3,
|
||||
'since': since.toIso8601String(),
|
||||
},
|
||||
options: _cacheOptions,
|
||||
);
|
||||
List<dynamic> commits = response.data;
|
||||
return commits
|
||||
.map((commit) =>
|
||||
(commit['commit']['message'] as String).split('\n')[0])
|
||||
.map(
|
||||
(commit) => (commit['commit']['message']).split('\n')[0] +
|
||||
' - ' +
|
||||
commit['commit']['author']['name'] +
|
||||
'\n' as String,
|
||||
)
|
||||
.toList();
|
||||
} on Exception {
|
||||
} catch (e) {
|
||||
return List.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class ManagerAPI {
|
||||
final String patcherRepo = 'revanced-patcher';
|
||||
final String cliRepo = 'revanced-cli';
|
||||
late SharedPreferences _prefs;
|
||||
String defaultApiUrl = 'https://revanced-releases-api.afterst0rm.xyz';
|
||||
String defaultApiUrl = 'https://releases.rvcd.win/';
|
||||
String defaultPatcherRepo = 'revanced/revanced-patcher';
|
||||
String defaultPatchesRepo = 'revanced/revanced-patches';
|
||||
String defaultIntegrationsRepo = 'revanced/revanced-integrations';
|
||||
@@ -314,7 +314,7 @@ class ManagerAPI {
|
||||
newCommits = await _githubAPI.getCommits(
|
||||
packageName,
|
||||
getPatchesRepo(),
|
||||
DateTime(2022, 3, 20, 21, 06, 01),
|
||||
patchDate,
|
||||
);
|
||||
}
|
||||
return newCommits;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import 'dart:io';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:native_dio_client/native_dio_client.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:dio_http_cache_lts/dio_http_cache_lts.dart';
|
||||
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||
import 'package:injectable/injectable.dart';
|
||||
import 'package:revanced_manager/models/patch.dart';
|
||||
import 'package:timeago/timeago.dart';
|
||||
import 'package:dio_http2_adapter/dio_http2_adapter.dart';
|
||||
|
||||
@lazySingleton
|
||||
class RevancedAPI {
|
||||
@@ -21,12 +21,7 @@ class RevancedAPI {
|
||||
_dio = Dio(BaseOptions(
|
||||
baseUrl: apiUrl,
|
||||
))
|
||||
..httpClientAdapter = Http2Adapter(
|
||||
ConnectionManager(
|
||||
idleTimeout: 10000,
|
||||
onClientCreate: (_, config) => config.onBadCertificate = (_) => true,
|
||||
),
|
||||
);
|
||||
..httpClientAdapter = NativeAdapter();
|
||||
_dio.interceptors.add(_dioCacheManager.interceptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,9 +73,9 @@ class PatchesSelectorViewModel extends BaseViewModel {
|
||||
.where((patch) =>
|
||||
query.isEmpty ||
|
||||
query.length < 2 ||
|
||||
patch.name.toLowerCase().contains(
|
||||
query.toLowerCase(),
|
||||
))
|
||||
patch.name.toLowerCase().contains(query.toLowerCase()) ||
|
||||
patch.getSimpleName().toLowerCase().contains(query.toLowerCase())
|
||||
)
|
||||
.toList();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ homepage: https://github.com/revanced/revanced-manager
|
||||
|
||||
publish_to: 'none'
|
||||
|
||||
version: 0.0.28+28
|
||||
version: 0.0.30+30
|
||||
|
||||
environment:
|
||||
sdk: ">=2.17.5 <3.0.0"
|
||||
@@ -20,7 +20,6 @@ dependencies:
|
||||
ref: revanced-manager
|
||||
device_info_plus: ^4.1.2
|
||||
dio: ^4.0.6
|
||||
dio_http2_adapter: ^2.0.0
|
||||
dio_http_cache_lts: ^0.4.1
|
||||
dynamic_color: ^1.5.4
|
||||
dynamic_themes: ^1.1.0
|
||||
@@ -51,6 +50,7 @@ dependencies:
|
||||
git:
|
||||
url: https://github.com/SuaMusica/logcat
|
||||
ref: feature/nullSafe
|
||||
native_dio_client: ^0.0.1-dev+1
|
||||
package_info_plus: ^1.4.3+1
|
||||
path_provider: ^2.0.11
|
||||
permission_handler: ^10.0.0
|
||||
|
||||
Reference in New Issue
Block a user