Skip to content

Commit d13ff20

Browse files
committed
Merge remote-tracking branch 'ened/android-agp-update' into Taym95-patch-1
2 parents bc26dd1 + f52bd60 commit d13ff20

File tree

13 files changed

+43
-51
lines changed

13 files changed

+43
-51
lines changed

bin/quality_checks.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/bin/bash -ex
2-
#workaround for codemagic CI since melos is not in bash
3-
echo 'export PATH="$PATH":"$FLUTTER_ROOT/.pub-cache/bin"' >>~/.bashrc
4-
echo 'export PATH="$PATH":"$FLUTTER_ROOT/bin"' >>~/.bashrc
5-
source ~/.bashrc
2+
export PATH="$PATH:$FLUTTER_ROOT/.pub-cache/bin"
3+
export PATH="$PATH:$FLUTTER_ROOT/bin"
64

75
dart pub global activate melos
86

codemagic.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ workflows:
88
instance_type: mac_mini_m1
99
environment:
1010
flutter: stable
11-
xcode: 14.0
11+
xcode: 14.3
1212
cocoapods: default
13+
java: 19.0.2
1314
cache:
1415
cache_paths: []
1516
triggering:
@@ -39,6 +40,8 @@ workflows:
3940
script: |
4041
# set up local properties
4142
echo "flutter.sdk=$HOME/programs/flutter" > "$FCI_BUILD_DIR/example/android/local.properties"
43+
echo "$JAVA_HOME"
44+
echo "org.gradle.java.home=$JAVA_HOME" >> "$FCI_BUILD_DIR/example/android/gradle.properties"
4245
- name: Quality checks monorepo
4346
script: |
4447
./bin/quality_checks.sh
@@ -53,6 +56,6 @@ workflows:
5356
find . -name "Podfile" -execdir pod install \;
5457
cd example && flutter build ios --debug --no-codesign
5558
artifacts:
56-
- example/build/**/outputs/**/*.apk
59+
- example/build/**/outputs/apk/*.apk
5760
- example/build/**/outputs/**/mapping.txt
5861
- example/build/ios/ipa/*.ipa

example/android/app/build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,12 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 31
29+
compileSdkVersion 33
3030

3131
sourceSets {
3232
main.java.srcDirs += 'src/main/kotlin'
3333
}
3434

35-
lintOptions {
36-
disable 'InvalidPackage'
37-
}
3835

3936
compileOptions {
4037
sourceCompatibility JavaVersion.VERSION_1_8
@@ -48,7 +45,7 @@ android {
4845
defaultConfig {
4946
applicationId "com.signify.hue.reactivebleexample"
5047
minSdkVersion 21
51-
targetSdkVersion 31
48+
targetSdkVersion 33
5249
versionCode flutterVersionCode.toInteger()
5350
versionName flutterVersionName
5451
}
@@ -59,6 +56,11 @@ android {
5956
signingConfig signingConfigs.debug
6057
}
6158
}
59+
namespace 'com.signify.hue.reactivebleexample'
60+
61+
lint {
62+
disable 'InvalidPackage'
63+
}
6264
}
6365

6466
flutter {

example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.signify.hue.reactivebleexample">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32

43
<uses-permission android:name="android.permission.INTERNET" />
54
<!-- required for API 18 - 30 -->

example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.5.31'
2+
ext.kotlin_version = '1.8.21'
33
repositories {
44
mavenCentral()
55
google()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.0.2'
9+
classpath 'com.android.tools.build:gradle:8.0.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

example/android/gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
android.enableJetifier=true
1+
android.defaults.buildfeatures.buildconfig=true
2+
android.enableJetifier=false
3+
android.nonFinalResIds=false
4+
android.nonTransitiveRClass=false
25
android.useAndroidX=true
36
org.gradle.jvmargs=-Xmx1536M

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip

example/android/settings.gradle

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
include ':app'
22

3-
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
3+
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4+
def properties = new Properties()
45

5-
def plugins = new Properties()
6-
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7-
if (pluginsFile.exists()) {
8-
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9-
}
6+
assert localPropertiesFile.exists()
7+
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
108

11-
plugins.each { name, path ->
12-
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13-
include ":$name"
14-
project(":$name").projectDir = pluginDirectory
15-
}
9+
def flutterSdkPath = properties.getProperty("flutter.sdk")
10+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11+
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

example/lib/src/ui/device_detail/device_detail_screen.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ class _DeviceDetail extends StatelessWidget {
3030
final DiscoveredDevice device;
3131
final void Function(String deviceId) disconnect;
3232
@override
33-
Widget build(BuildContext context) => WillPopScope(
34-
onWillPop: () async {
33+
Widget build(BuildContext context) => PopScope(
34+
canPop: true,
35+
onPopInvoked: (_) async {
3536
disconnect(device.id);
36-
return true;
3737
},
3838
child: DefaultTabController(
3939
length: 2,

packages/reactive_ble_mobile/android/build.gradle

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version '1.0-SNAPSHOT'
33

44
buildscript {
55
ext.detekt_version = '1.17.1'
6-
ext.kotlin_version = '1.5.31'
6+
ext.kotlin_version = '1.8.21'
77
repositories {
88
google()
99
mavenCentral()
@@ -13,8 +13,8 @@ buildscript {
1313
}
1414

1515
dependencies {
16-
classpath 'com.android.tools.build:gradle:7.0.3'
17-
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17'
16+
classpath 'com.android.tools.build:gradle:8.0.2'
17+
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.3'
1818
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1919
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detekt_version"
2020
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1"
@@ -38,7 +38,7 @@ apply plugin: "io.gitlab.arturbosch.detekt"
3838
apply plugin: "de.mannodermaus.android-junit5"
3939

4040
android {
41-
compileSdkVersion 31
41+
compileSdkVersion 33
4242
sourceSets {
4343
main.java.srcDirs += 'src/main/kotlin'
4444
test.java.srcDirs += 'src/test/kotlin'
@@ -51,11 +51,13 @@ android {
5151

5252
defaultConfig {
5353
minSdkVersion 21
54-
targetSdkVersion 31
54+
targetSdkVersion 33
5555
consumerProguardFiles 'proguard-rules.txt'
5656
}
5757

58-
lintOptions {
58+
namespace 'com.signify.hue.flutterreactiveble'
59+
60+
lint {
5961
disable 'InvalidPackage'
6062
}
6163

@@ -79,7 +81,7 @@ detekt {
7981

8082
protobuf {
8183
protoc {
82-
artifact = 'com.google.protobuf:protoc:3.18.1'
84+
artifact = 'com.google.protobuf:protoc:3.23.0'
8385
}
8486

8587
generateProtoTasks {
@@ -96,7 +98,7 @@ protobuf {
9698
dependencies {
9799
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
98100
implementation 'com.polidea.rxandroidble2:rxandroidble:1.16.0'
99-
implementation 'com.google.protobuf:protobuf-javalite:3.18.1'
101+
implementation 'com.google.protobuf:protobuf-javalite:3.23.0'
100102
implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0'
101103
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
102104

0 commit comments

Comments
 (0)