From 16d224b39e5131a0bdc75f3d69b9323691db8682 Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Thu, 27 Jun 2024 15:52:52 -0400 Subject: [PATCH] resolve failed presubmit test by updating second example --- .../flutter_module_using_plugin/pubspec.yaml | 2 +- .../android_using_plugin/app/build.gradle | 22 ++++++++++++------- .../app/src/main/AndroidManifest.xml | 3 +-- .../plugin/android_using_plugin/build.gradle | 2 +- .../android_using_plugin/gradle.properties | 2 ++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../flutter_module_using_plugin/lib/cell.dart | 4 ++-- .../flutter_module_using_plugin/pubspec.yaml | 2 +- 8 files changed, 23 insertions(+), 16 deletions(-) diff --git a/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml b/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml index 4c716396f..7ea5799bb 100644 --- a/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml +++ b/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter provider: ^6.0.2 - url_launcher: ^6.0.6 + url_launcher: ^6.0.20 sensors_plus: ^5.0.1 dev_dependencies: diff --git a/add_to_app/plugin/android_using_plugin/app/build.gradle b/add_to_app/plugin/android_using_plugin/app/build.gradle index 941b8bb4f..b09e5884a 100644 --- a/add_to_app/plugin/android_using_plugin/app/build.gradle +++ b/add_to_app/plugin/android_using_plugin/app/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { - compileSdkVersion 33 + compileSdk 34 defaultConfig { applicationId "dev.flutter.example.androidusingplugin" - minSdkVersion 19 - targetSdkVersion 33 + minSdkVersion 21 + targetSdk 34 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -17,19 +17,25 @@ android { minifyEnabled false } } + // Keep java and kotlin versions in sync. compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } + kotlinOptions { + jvmTarget = '1.8' + } + + namespace 'dev.flutter.example.androidusingplugin' } dependencies { implementation project(':flutter') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'androidx.core:core-ktx:1.13.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/add_to_app/plugin/android_using_plugin/app/src/main/AndroidManifest.xml b/add_to_app/plugin/android_using_plugin/app/src/main/AndroidManifest.xml index 8766e128d..f0161e6a8 100644 --- a/add_to_app/plugin/android_using_plugin/app/src/main/AndroidManifest.xml +++ b/add_to_app/plugin/android_using_plugin/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + with WidgetsBindingObserver { // Don't continuously rebuild for nothing when the // cell isn't visible. stream: appLifecycleState == AppLifecycleState.resumed - ? accelerometerEvents + ? accelerometerEventStream() : Stream.value(defaultPosition), initialData: defaultPosition, builder: (context, snapshot) { diff --git a/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml b/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml index 201d1f218..7ea5799bb 100644 --- a/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml +++ b/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: sdk: flutter provider: ^6.0.2 url_launcher: ^6.0.20 - sensors: ^2.0.3 + sensors_plus: ^5.0.1 dev_dependencies: analysis_defaults: