diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index a9d2c41bc..65417088b 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -50,7 +50,7 @@ jobs: echo $APKSIGN_KEYSTORE_BASE64 | base64 -di > release.jks export APKSIGN_KEYSTORE=`pwd`/release.jks flutter build apk --release --build-number=$buildNumber --build-name=$buildName - mv build/app/outputs/apk/release/ProjectUnity*.apk . + mv build/app/outputs/apk/release/*.apk . env: APKSIGN_KEYSTORE_BASE64: ${{ secrets.APKSIGN_KEYSTORE_BASE64 }} APKSIGN_KEYSTORE_PASS: ${{ secrets.APKSIGN_KEYSTORE_PASS }} diff --git a/android/app/build.gradle b/android/app/build.gradle index c42208bfe..279d89788 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -2,35 +2,13 @@ plugins { id "com.android.application" id "kotlin-android" id "dev.flutter.flutter-gradle-plugin" - id "com.google.gms.google-services" - id "com.google.firebase.crashlytics" } - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - - - - android { compileSdkVersion 34//flutter.compileSdkVersion + namespace = "com.example.canopas_unity" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -38,7 +16,7 @@ android { } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = JavaVersion.VERSION_1_8 } sourceSets { @@ -48,10 +26,10 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.canopas.projectunity" - minSdkVersion 21 - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + minSdkVersion 34 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName android.applicationVariants.all { variant -> variant.outputs.all { outputFileName = "ProjectUnity-${variant.name}-${versionName}-${versionCode}.apk" @@ -101,6 +79,4 @@ flutter { source '../..' } -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0" -} + diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 934fc2b33..f880684a6 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index fe30fae21..1d396a7c4 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ - + - + diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 3556a8496..74777a880 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Apr 26 12:42:38 IST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/settings.gradle b/android/settings.gradle index 5046f4aac..2047f3c8f 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.0.4" apply false - id "org.jetbrains.kotlin.android" version "1.8.21" apply false + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false id "com.google.gms.google-services" version "4.3.10" apply false id "com.google.firebase.crashlytics" version "2.9.9" apply false diff --git a/lib/ui/sign_in/bloc/sign_in_view_bloc.dart b/lib/ui/sign_in/bloc/sign_in_view_bloc.dart index f105dd0c8..5f691dc9d 100644 --- a/lib/ui/sign_in/bloc/sign_in_view_bloc.dart +++ b/lib/ui/sign_in/bloc/sign_in_view_bloc.dart @@ -39,7 +39,7 @@ class SignInBloc extends Bloc { } else { emit(state.copyWith(googleSignInLoading: false)); } - } on Exception { + } catch(e) { emit(state.copyWith( googleSignInLoading: false, error: firesbaseAuthError)); }