From be9c0873e09e2760cd1ef2ddd251dade278b77d2 Mon Sep 17 00:00:00 2001 From: Joe Freeman Date: Mon, 13 Jan 2025 21:23:26 -0500 Subject: [PATCH 1/2] Update AGP, gradle, target api to 34, .gitigmore .cxx --- example/android/.gitignore | 4 +++- example/android/app/build.gradle | 6 +++--- example/android/gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/settings.gradle | 2 +- example/devtools_options.yaml | 3 +++ 5 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 example/devtools_options.yaml diff --git a/example/android/.gitignore b/example/android/.gitignore index 9eaee1a5..d83574ed 100644 --- a/example/android/.gitignore +++ b/example/android/.gitignore @@ -10,4 +10,6 @@ GeneratedPluginRegistrant.java # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties **/*.keystore -**/*.jks \ No newline at end of file +**/*.jks + +**/.cxx/ \ No newline at end of file diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index a07261ac..c6e87da0 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -23,7 +23,7 @@ if (flutterVersionName == null) { } android { - compileSdkVersion 33 + compileSdkVersion 34 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -41,8 +41,8 @@ android { defaultConfig { applicationId "com.signify.hue.reactivebleexample" - minSdkVersion 21 - targetSdkVersion 33 + minSdkVersion 34 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 89e56bdb..2aaed3a1 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle index a4124b6e..84924928 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.0.2" apply false + id "com.android.application" version "8.7.0" apply false id "org.jetbrains.kotlin.android" version "1.8.21" apply false } diff --git a/example/devtools_options.yaml b/example/devtools_options.yaml new file mode 100644 index 00000000..fa0b357c --- /dev/null +++ b/example/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: From fcfcaa8340a4fe339694b66bede42b12f7ade908 Mon Sep 17 00:00:00 2001 From: Joe Freeman Date: Mon, 13 Jan 2025 21:55:33 -0500 Subject: [PATCH 2/2] Updated the Java target version to 11. Time to move up to java 11 and API 34 - left module the same --- example/README.md | 19 ++++++++++++++++++- example/android/app/build.gradle | 6 +++--- example/android/settings.gradle | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/example/README.md b/example/README.md index 6ace9f6a..71508300 100644 --- a/example/README.md +++ b/example/README.md @@ -5,4 +5,21 @@ Demonstrates how to use the `flutter_reactive_ble` plugin. ## Getting Started For help getting started with Flutter, view our online -[documentation](http://flutter.dev/). \ No newline at end of file +[documentation](http://flutter.dev/). + +## Android permissions + +The example application requests certain permissions and will display a message similar to the following on launch without them. + +> "Authorize the FlutterReactiveBle example app to use Bluetooth and location" + +Enable visibility to nearby devices + +1. Open the _Settings_ +2. Find and click on _Apps_ +3. Find and click on _flutter_reactive_ble_example_ +4. Scroll to _Permissions : nearby devices_ +5. _Nearby Devices_ should appear in the _not allowed_ section. +6. Click on _Nearby Devices_ and select _allow_ + +This permission will persist until you delete the example app from the device. diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index c6e87da0..55fc17ce 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -31,12 +31,12 @@ android { compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() + jvmTarget = JavaVersion.VERSION_11.toString() } defaultConfig { diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 84924928..a844aa4e 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.7.0" apply false + id "com.android.application" version "8.7.3" apply false id "org.jetbrains.kotlin.android" version "1.8.21" apply false }