Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mobile App] 989: Update Flutter SDK and packages, Xcode, Android Gradle #991

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
447ee0a
Update to Flutter SDK 3.27.1
KarinBerg Dec 20, 2024
097de32
Update Firebase Flutter packages
KarinBerg Dec 20, 2024
45ac667
Update remaining flutter packages to latest possible version
KarinBerg Dec 20, 2024
6fa9165
Upgrade Android Gradle to be compatible to Android Studio LadyBug wit…
KarinBerg Dec 20, 2024
3f75983
Flutter analyse fix: Don't use 'BuildContext's across async gaps.
KarinBerg Dec 20, 2024
7b6eb2b
Prettified Code!
KarinBerg Dec 20, 2024
9fda3d1
Only add comments
KarinBerg Dec 21, 2024
60bd4da
Remove not used FlutterFire CLI file
KarinBerg Dec 25, 2024
371a583
Merge branch 'main' into karin/chore/989-update-flutter-sdk-and-packa…
KarinBerg Jan 11, 2025
185d4eb
Update README.md
KarinBerg Jan 11, 2025
503498e
Update codemagic.yaml to tools upgrade
KarinBerg Jan 11, 2025
5addbef
Update build_number
KarinBerg Jan 11, 2025
ba6eadb
Prettified Code!
KarinBerg Jan 11, 2025
06d61fe
Use Java 21
KarinBerg Jan 12, 2025
cddbb23
clean artifact to upload to CodeMagic build
KarinBerg Jan 12, 2025
892ef24
increment build number
KarinBerg Jan 12, 2025
eb050e2
correct apk path to avoid uploading two apks
KarinBerg Jan 12, 2025
f6f091a
Merge branch 'main' into karin/chore/989-update-flutter-sdk-and-packa…
KarinBerg Jan 19, 2025
9afd1b3
Update recipients_app/ios/Flutter/AppFrameworkInfo.plist to use iOS 1…
KarinBerg Jan 19, 2025
9ec7082
Remove TODO
KarinBerg Jan 19, 2025
af7ac6d
Merge branch 'main' into karin/chore/989-update-flutter-sdk-and-packa…
KarinBerg Jan 23, 2025
4f282d3
Merge branch 'main' into karin/chore/989-update-flutter-sdk-and-packa…
KarinBerg Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion recipients_app/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
flutter 3.22.3
flutter 3.27.1
ruby 3.2.2
37 changes: 19 additions & 18 deletions recipients_app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Mobile App for Recipients of a Social Income.
- Java JDK 17
- Android Studio LadyBug or later
- Latest vsCode
- Xcode 16.1
- Xcode 16.x

## Configure the Apple Silicon Mac environment to build our app

Expand All @@ -26,23 +26,24 @@ Mobile App for Recipients of a Social Income.
export PATH="$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools"
```
- Restart your terminal so that these changes take effect
- Install Java 17 via Homebrew `brew install openjdk@17`
- Homebrew is telling you to execute a symlink command, so that the
system Java wrappers can find this JDK. Please do this.
- Additionally in your USER's HOME directory in the file '.zshrc', add
the lines to set the JAVA_HOME environment variable to Java 17 and
add Java to the PATH environment variable
```shell
export JAVA_HOME=$(/usr/libexec/java_home -v17)
export PATH="$PATH:$JAVA_HOME/bin"
```
- Restart your terminal so that these changes take effect
- Install Flutter
- Tell Flutter to use our Java 17 JDK and not the one bundle with
Android Studio via `flutter config --jdk-dir "$JAVA_HOME"`.
Otherwise, you will get the error "Unsupported class file major
version 65” when building the app for Android.
- Restart your terminal and IDE so that these changes take effect
- Optional: Pin Flutter's JDK version and do not use the JDK from Android Studio by default
- Install Java 21 via Homebrew `brew install openjdk@21`
- Homebrew is telling you to execute a symlink command, so that the
system Java wrappers can find this JDK. Please do this.
- Additionally in your USER's HOME directory in the file '.zshrc', add
the lines to set the JAVA_HOME environment variable to Java 21 and
add Java to the PATH environment variable
```shell
export JAVA_HOME=$(/usr/libexec/java_home -v21)
export PATH="$PATH:$JAVA_HOME/bin"
```
- Restart your terminal so that these changes take effect
- Install Flutter
- Tell Flutter to use our Java 21 JDK and not the one bundle with
Android Studio via `flutter config --jdk-dir "$JAVA_HOME"`.
Otherwise, you will get the error "Unsupported class file major
version XX" when building the app for Android.
- Restart your terminal and IDE so that these changes take effect
- Install vsCode
- Install Flutter extension
- Install Xcode
Expand Down
4 changes: 3 additions & 1 deletion recipients_app/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ gradle-wrapper.jar
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
17 changes: 12 additions & 5 deletions recipients_app/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
id "com.google.gms.google-services"
}
Expand Down Expand Up @@ -30,15 +31,25 @@ if (keystorePropertiesFile.exists()) {
}

android {
namespace 'org.socialincome.app'
compileSdkVersion 34

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
applicationId "org.socialincome.app"
minSdkVersion 21
minSdkVersion 23
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down Expand Up @@ -84,7 +95,3 @@ flutter {
source '../..'
}

dependencies {
}


6 changes: 3 additions & 3 deletions recipients_app/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.socialincome.app">
<!-- Flutter needs it to communicate with the running application
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
3 changes: 1 addition & 2 deletions recipients_app/android/app/src/dev/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.socialincome.app">
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved
xmlns:tools="http://schemas.android.com/tools">
<!-- Flutter needs it for communicate with firebase emulators -->
<application
android:label="Dev Social Income"
Expand Down
3 changes: 1 addition & 2 deletions recipients_app/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="org.socialincome.app">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />

Expand Down
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

6 changes: 3 additions & 3 deletions recipients_app/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.socialincome.app">
<!-- Flutter needs it to communicate with the running application
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
3 changes: 1 addition & 2 deletions recipients_app/android/app/src/stage/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.socialincome.app">
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved
xmlns:tools="http://schemas.android.com/tools">
<application
android:label="Stage Social Income"
tools:replace="android:label"/>
Expand Down
4 changes: 2 additions & 2 deletions recipients_app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ allprojects {
}
}

rootProject.buildDir = '../build'
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}

subprojects {
project.evaluationDependsOn(':app')
project.evaluationDependsOn(":app")
}

tasks.register("clean", Delete) {
Expand Down
5 changes: 4 additions & 1 deletion recipients_app/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions recipients_app/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

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
id "com.android.application" version '8.7.3' apply false
id "org.jetbrains.kotlin.android" version "1.8.22" 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
}
Expand Down
4 changes: 2 additions & 2 deletions recipients_app/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '12.0'
platform :ios, '13.0'
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down 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.25.0'
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '11.4.0'
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved

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