Skip to content

Commit

Permalink
1353: upgrade flutter ci, fix deprecated methods, update gradle, upda…
Browse files Browse the repository at this point in the history
…te android image
  • Loading branch information
f1sh1918 committed Mar 25, 2024
1 parent afd2295 commit 98a5286
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 28 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ commands:
steps:
- run:
command: |-
curl -o dart.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.0.5/linux_packages/dart_3.0.5-1_amd64.deb
curl -o dart.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.3.1/linux_packages/dart_3.3.1-1_amd64.deb
sudo dpkg -i dart.deb
name: Install Dart
install_dart_mac:
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:
working_directory: ~/project
build_android:
docker:
- image: cimg/android:2023.02.1-node
- image: cimg/android:2024.01.1-node
environment:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx2048m" -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2
parameters:
Expand Down Expand Up @@ -692,7 +692,7 @@ jobs:
- notify
deliver_android:
docker:
- image: cimg/android:2023.02.1-node
- image: cimg/android:2024.01.1-node
environment:
FASTLANE_SKIP_UPDATE_CHECK: true
parameters:
Expand Down Expand Up @@ -906,7 +906,7 @@ jobs:
working_directory: ~/project/administration
promote_android:
docker:
- image: cimg/android:2023.02.1-node
- image: cimg/android:2024.01.1-node
environment:
FASTLANE_SKIP_UPDATE_CHECK: true
parameters:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/commands/install_dart_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ steps:
- run:
name: Install Dart
command: |
curl -o dart.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.0.5/linux_packages/dart_3.0.5-1_amd64.deb
curl -o dart.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.3.1/linux_packages/dart_3.3.1-1_amd64.deb
sudo dpkg -i dart.deb
2 changes: 1 addition & 1 deletion .circleci/src/jobs/build_android.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
docker:
- image: cimg/android:2023.02.1-node
- image: cimg/android:2024.01.1-node
parameters:
buildConfig:
description: "Name of the build config to use"
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/deliver_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
description: Whether to deliver the build to production.
type: boolean
docker:
- image: cimg/android:2023.02.1-node
- image: cimg/android:2024.01.1-node
resource_class: small
shell: /bin/bash -eo pipefail
environment:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/promote_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
enum: [bayern, nuernberg]
default: bayern
docker:
- image: cimg/android:2023.02.1-node
- image: cimg/android:2024.01.1-node
resource_class: small
shell: /bin/bash -eo pipefail
environment:
Expand Down
2 changes: 1 addition & 1 deletion frontend/.fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.10.2",
"flutterSdkVersion": "3.19.3",
"flavors": {}
}
2 changes: 1 addition & 1 deletion frontend/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ android {

defaultConfig {
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
Binary file modified frontend/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion frontend/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions frontend/android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 1 addition & 0 deletions frontend/android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
13 changes: 3 additions & 10 deletions frontend/lib/home/app_flows_stack.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,9 @@ class AppFlowsStack extends StatelessWidget {

@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
final currentState = appFlows[currentIndex].navigatorKey.currentState;
final currentStatePopped = await currentState?.maybePop() ?? false;
return !currentStatePopped;
},
child: IndexedStack(
index: currentIndex,
children: _buildChildren(),
),
return IndexedStack(
index: currentIndex,
children: _buildChildren(),
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ActivationCodeScannerPage extends StatelessWidget {

Future<void> _onCodeScanned(BuildContext context, Uint8List code) async {
Future<void> showError(String msg, dynamic stackTrace) async =>
{await QrParsingErrorDialog.showErrorDialog(context, msg), await reportError(msg, stackTrace)};
[await QrParsingErrorDialog.showErrorDialog(context, msg), await reportError(msg, stackTrace)];

try {
final activationCode = const ActivationCodeParser().parseQrCodeContent(code);
Expand Down
2 changes: 1 addition & 1 deletion frontend/lib/identification/id_card/id_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class IdCard extends StatelessWidget {
aspectRatio: creditCardAspectRatio,
child: MediaQuery(
// Ignore text scale factor to enforce the same layout on all devices.
data: mediaQueryData.copyWith(textScaleFactor: 1),
data: mediaQueryData.copyWith(textScaler: TextScaler.linear(1)),
child: CardContent(cardInfo: cardInfo, region: region, isExpired: isExpired, isNotYetValid: isNotYetValid),
),
),
Expand Down
2 changes: 1 addition & 1 deletion frontend/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
flutter_svg: ^2.0.2
permission_handler: ^11.3.0
package_info_plus: ^4.0.1 # for about dialog
mobile_scanner: ^4.0.1 # Pinning this version because of https://github.com/juliansteenbakker/mobile_scanner/issues/582
mobile_scanner: ^4.0.1
fixnum: ^1.1.0
flutter_secure_storage: ^9.0.0
infinite_scroll_pagination: ^4.0.0
Expand Down

0 comments on commit 98a5286

Please sign in to comment.