Skip to content

Commit

Permalink
feat(mobile_app):807 flutter gradle update (#813)
Browse files Browse the repository at this point in the history
- updated android sdk to 34
- updated to flutter 3.19.5
- updated
- updated ios stuff
  • Loading branch information
novas1r1 authored Jun 14, 2024
1 parent 31d0d27 commit 1956601
Show file tree
Hide file tree
Showing 14 changed files with 474 additions and 297 deletions.
1 change: 0 additions & 1 deletion recipients_app/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ linter:
prefer_const_constructors_in_immutables: true

dart_code_metrics:
exclude: ["lib/**/*.g.dart"]
rules:
prefer-single-widget-per-file: false
29 changes: 10 additions & 19 deletions recipients_app/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
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()) {
Expand All @@ -6,11 +14,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") //changed this line by removing new before GradleException because it was creating an error -Fariha
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,21 +24,14 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
// implementation 'androidx.browser:browser:1.3.0' - do I need this? (Was added)

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion 33
compileSdkVersion 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -44,7 +40,7 @@ android {
defaultConfig {
applicationId "org.socialincome.app"
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
Expand Down Expand Up @@ -90,11 +86,6 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"


// Add the dependencies for any other desired Firebase products
// https://firebase.google.com/docs/android/setup#available-libraries
}


16 changes: 1 addition & 15 deletions recipients_app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
}
}

allprojects {
repositories {
google()
Expand All @@ -24,6 +9,7 @@ rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}

subprojects {
project.evaluationDependsOn(':app')
}
Expand Down
33 changes: 25 additions & 8 deletions recipients_app/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
// TODO(Verena): update to 4.4.0 once https://github.com/firebase/flutterfire/discussions/8691 is fixed
id "com.google.gms.google-services" version "4.3.15" apply false
id "com.google.firebase.crashlytics" version "2.8.1" apply false
}

include ":app"
1 change: 1 addition & 0 deletions recipients_app/devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extensions:
2 changes: 1 addition & 1 deletion recipients_app/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.18.0'
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.24.0'

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
Expand Down
Loading

0 comments on commit 1956601

Please sign in to comment.