mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-21 16:01:58 +00:00
fix
This commit is contained in:
parent
d5247a8183
commit
1c256f884d
3 changed files with 81 additions and 56 deletions
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
|
|
@ -34,6 +34,14 @@ jobs:
|
||||||
with:
|
with:
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
|
env:
|
||||||
|
JAVA_OPTS: "-Xmx4096m -XX:MaxMetaspaceSize=512m"
|
||||||
|
|
||||||
|
- name: Setup Gradle properties for CI
|
||||||
|
run: |
|
||||||
|
echo "org.gradle.jvmargs=-Xmx4096M -XX:MaxMetaspaceSize=512m -XX:+UseG1GC" >> android/gradle.properties
|
||||||
|
echo "org.gradle.parallel=true" >> android/gradle.properties
|
||||||
|
echo "org.gradle.daemon=false" >> android/gradle.properties
|
||||||
|
|
||||||
- name: Setup cmake
|
- name: Setup cmake
|
||||||
uses: jwlawson/actions-setup-cmake@v2
|
uses: jwlawson/actions-setup-cmake@v2
|
||||||
|
|
@ -56,7 +64,8 @@ jobs:
|
||||||
|
|
||||||
- name: build android apks
|
- name: build android apks
|
||||||
run: |
|
run: |
|
||||||
flutter build apk --release --split-per-abi
|
export GRADLE_OPTS="-Xmx4096m -XX:MaxMetaspaceSize=512m -XX:+UseG1GC"
|
||||||
|
flutter build apk --release --split-per-abi --verbose
|
||||||
cd build/app/outputs/flutter-apk
|
cd build/app/outputs/flutter-apk
|
||||||
mv app-arm64-v8a-release.apk Mangayomi-${{ github.ref_name }}-android-arm64-v8a.apk
|
mv app-arm64-v8a-release.apk Mangayomi-${{ github.ref_name }}-android-arm64-v8a.apk
|
||||||
mv app-armeabi-v7a-release.apk Mangayomi-${{ github.ref_name }}-android-armeabi-v7a.apk
|
mv app-armeabi-v7a-release.apk Mangayomi-${{ github.ref_name }}-android-armeabi-v7a.apk
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,10 @@
|
||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx4096M -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
|
||||||
|
# Optimizations for build performance
|
||||||
|
org.gradle.parallel=true
|
||||||
|
org.gradle.caching=true
|
||||||
|
org.gradle.configureondemand=true
|
||||||
|
android.enableR8.fullMode=true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,7 @@ class _SourceRepositoriesState extends ConsumerState<SourceRepositories> {
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton.extended(
|
floatingActionButton: FloatingActionButton.extended(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
bool isLoading = false;
|
||||||
final controller = TextEditingController();
|
final controller = TextEditingController();
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
@ -269,62 +270,70 @@ class _SourceRepositoriesState extends ConsumerState<SourceRepositories> {
|
||||||
child: Text(l10n.cancel),
|
child: Text(l10n.cancel),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 15),
|
const SizedBox(width: 15),
|
||||||
TextButton(
|
StatefulBuilder(
|
||||||
onPressed:
|
builder: (context, setState) {
|
||||||
controller.text.isEmpty ||
|
return TextButton(
|
||||||
!controller.text.endsWith(".json")
|
onPressed:
|
||||||
? null
|
|
||||||
: () async {
|
|
||||||
try {
|
|
||||||
final mangaRepos = ref
|
|
||||||
.read(
|
|
||||||
extensionsRepoStateProvider(
|
|
||||||
widget.itemType,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList();
|
|
||||||
final repo = await ref.read(
|
|
||||||
getRepoInfosProvider(
|
|
||||||
jsonUrl: controller.text,
|
|
||||||
).future,
|
|
||||||
);
|
|
||||||
if (repo == null) {
|
|
||||||
botToast(l10n.unsupported_repo);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mangaRepos.add(repo);
|
|
||||||
ref
|
|
||||||
.read(
|
|
||||||
extensionsRepoStateProvider(
|
|
||||||
widget.itemType,
|
|
||||||
).notifier,
|
|
||||||
)
|
|
||||||
.set(mangaRepos);
|
|
||||||
ref.invalidate(
|
|
||||||
extensionsRepoStateProvider(
|
|
||||||
widget.itemType,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} catch (e, s) {
|
|
||||||
botToast('$e\n$s');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (context.mounted) {
|
|
||||||
Navigator.pop(context);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
l10n.add,
|
|
||||||
style: TextStyle(
|
|
||||||
color:
|
|
||||||
controller.text.isEmpty ||
|
controller.text.isEmpty ||
|
||||||
!controller.text.endsWith(".json")
|
!controller.text.endsWith(".json")
|
||||||
? Theme.of(
|
? null
|
||||||
context,
|
: () async {
|
||||||
).primaryColor.withValues(alpha: 0.2)
|
setState(() => isLoading = true);
|
||||||
: null,
|
try {
|
||||||
),
|
final mangaRepos = ref
|
||||||
),
|
.read(
|
||||||
|
extensionsRepoStateProvider(
|
||||||
|
widget.itemType,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList();
|
||||||
|
final repo = await ref.read(
|
||||||
|
getRepoInfosProvider(
|
||||||
|
jsonUrl: controller.text,
|
||||||
|
).future,
|
||||||
|
);
|
||||||
|
if (repo == null) {
|
||||||
|
botToast(l10n.unsupported_repo);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mangaRepos.add(repo);
|
||||||
|
ref
|
||||||
|
.read(
|
||||||
|
extensionsRepoStateProvider(
|
||||||
|
widget.itemType,
|
||||||
|
).notifier,
|
||||||
|
)
|
||||||
|
.set(mangaRepos);
|
||||||
|
} catch (e, s) {
|
||||||
|
setState(() => isLoading = false);
|
||||||
|
botToast('$e\n$s');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (context.mounted) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: isLoading
|
||||||
|
? SizedBox(
|
||||||
|
height: 20,
|
||||||
|
width: 20,
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
)
|
||||||
|
: Text(
|
||||||
|
l10n.add,
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
controller.text.isEmpty ||
|
||||||
|
!controller.text.endsWith(
|
||||||
|
".json",
|
||||||
|
)
|
||||||
|
? Theme.of(context).primaryColor
|
||||||
|
.withValues(alpha: 0.2)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue