Skip to content

Commit

Permalink
Fix ci builds
Browse files Browse the repository at this point in the history
  • Loading branch information
wrngwrld committed Dec 15, 2024
1 parent ef2ec6e commit 4aaa9d6
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: "☕️ Setup Java"
uses: actions/setup-java@v1
with:
java-version: "12.x"
java-version: "17.x"

# Setup the flutter environment.
- name: "🦋 Setup Flutter"
Expand Down
34 changes: 22 additions & 12 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ if (flutterVersionName == null) {
android {
compileSdkVersion 34

lintOptions {
checkReleaseBuilds false
}


sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
Expand All @@ -41,14 +38,14 @@ android {
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
packagingOptions
{
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
exclude 'META-INF/DEPENDENCIES'
exclude("META-INF/*")
packagingOptions {
jniLibs {
excludes += ['META-INF/*']
pickFirsts += ['lib/x86/libc++_shared.so', 'lib/x86_64/libc++_shared.so', 'lib/armeabi-v7a/libc++_shared.so', 'lib/arm64-v8a/libc++_shared.so']
}
resources {
excludes += ['META-INF/DEPENDENCIES', 'META-INF/*']
}
}
buildTypes {
release {
Expand All @@ -59,8 +56,21 @@ android {
shrinkResources false
}
}
namespace 'com.wrngwrld.chanyan'
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
lint {
checkReleaseBuilds false
}
}

flutter {
source '../..'
}

subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
3 changes: 1 addition & 2 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wrngwrld.chanyan">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
3 changes: 1 addition & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wrngwrld.chanyan">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
Expand Down
3 changes: 1 addition & 2 deletions android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wrngwrld.chanyan">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
4 changes: 4 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ org.gradle.jvmargs=-Xmx1536M \
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
android.useAndroidX=true
android.enableJetifier=true
kotlin.jvm.target.validation.mode=warning
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
5 changes: 3 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.4.0" apply false
id "com.android.application" version '8.7.3' apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}

Expand Down
2 changes: 1 addition & 1 deletion ios/ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
cd $CI_PRIMARY_REPOSITORY_PATH # change working directory to the root of your cloned repo.

# Specify the Flutter tag you want to checkout.
FLUTTER_TAG="3.19.6"
FLUTTER_TAG="3.27.0"

# Install Flutter using git with the specified tag.
git clone https://github.com/flutter/flutter.git --depth 1 --branch $FLUTTER_TAG $HOME/flutter
Expand Down
10 changes: 5 additions & 5 deletions lib/API/save_videos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:flutter_chan/Models/saved_attachment.dart';
import 'package:flutter_chan/blocs/saved_attachments_model.dart';
import 'package:flutter_chan/pages/savedAttachments/permission_denied.dart';
import 'package:image_gallery_saver/image_gallery_saver.dart';
import 'package:image_gallery_saver_plus/image_gallery_saver_plus.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
import 'package:path_provider/path_provider.dart';
import 'package:permission_handler/permission_handler.dart';
Expand Down Expand Up @@ -104,7 +104,7 @@ Future<void> saveVideo(
}

if (Platform.isIOS) {
await ImageGallerySaver.saveFile(
await ImageGallerySaverPlus.saveFile(
'${directory.path}/savedAttachments/$fileName'
.replaceAll('.webm', '.mp4'),
isReturnPathOfIOS: true,
Expand All @@ -120,7 +120,7 @@ Future<void> saveVideo(
null,
});
} else {
await ImageGallerySaver.saveFile(
await ImageGallerySaverPlus.saveFile(
'${directory.path}/savedAttachments/$fileName'
.replaceAll('.webm', '.mp4'),
isReturnPathOfIOS: true,
Expand Down Expand Up @@ -172,7 +172,7 @@ Future<void> saveVideo(
await convertWebMToMP4(videoCache, fileDownloadPath);

if (ReturnCode.isSuccess(returnCode)) {
await ImageGallerySaver.saveFile(
await ImageGallerySaverPlus.saveFile(
fileDownloadPath.path.replaceAll('.webm', '.mp4'),
isReturnPathOfIOS: true,
).then((value) => {
Expand All @@ -197,7 +197,7 @@ Future<void> saveVideo(
);
}
} else {
await ImageGallerySaver.saveFile(videoCache.path,
await ImageGallerySaverPlus.saveFile(videoCache.path,
isReturnPathOfIOS: true)
.then((value) => {
if (showSnackBar) Navigator.pop(context),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies:
flutter_html: ^3.0.0-alpha.6
path_provider: ^2.1.5
dio: ^5.7.0
image_gallery_saver: ^2.0.3
image_gallery_saver_plus: ^3.0.5
permission_handler: ^11.3.1
flutter_launcher_icons: ^0.14.2
shared_preferences: ^2.3.3
Expand Down

0 comments on commit 4aaa9d6

Please sign in to comment.