-
Notifications
You must be signed in to change notification settings - Fork 81
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
refactor: update Android bridge #171
Conversation
a8962f9
to
dbc2f0b
Compare
@@ -2,14 +2,14 @@ group 'com.amplitude.amplitude_flutter' | |||
version '1.0-SNAPSHOT' | |||
|
|||
buildscript { | |||
ext.kotlin_version = '1.7.10' | |||
ext.kotlin_version = '1.5.20' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to an earlier version of kotlin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I lowered it for some compatibility issues. I don't see any harms to customers to lower the version. Do you any concern? I'm open to discussion and can try to see if I can revert it if it's necessary.
@@ -147,7 +147,7 @@ class Amplitude extends _Amplitude { | |||
event.mergeEventOptions(options); | |||
} | |||
|
|||
return await _channel.invokeMethod("track", jsonEncode(event.toMap())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this change? Was the old version calling the wrong method or did the interface change in the new Android SDK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to fix the error of my last commit. Note this PR is compared with branch 4.x
not main
. The interface setGroup()
remains unchanged.
android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt
Show resolved
Hide resolved
android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt
Outdated
Show resolved
Hide resolved
android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt
Show resolved
Hide resolved
…udeFlutterPlugin.kt Co-authored-by: Justin Fiedler <justin.fiedler@amplitude.com>
…amplitude/Amplitude-Flutter into AMP-89312-update-android-bridge
@@ -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-6.7.1-bin.zip | |||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip | |
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.2-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 1a3d02c.
example/android/app/build.gradle
Outdated
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||
|
||
android { | ||
compileSdkVersion 28 | ||
compileSdkVersion 33 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this 34 too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 1a3d02c.
🎉 This PR is included in version 4.0.0-beta.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt
android/src/test/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPluginTest.kt
To run Android native unit tests
cd example/android && ./gradlew testDebugUnitTest
Unfortunately I cannot make Android unit test CI running. Will just keep the tests to local for now.