-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add support for compiling to Kotlin/JS targets #146
Add support for compiling to Kotlin/JS targets #146
Conversation
I've added changes to support 1.8 compilation but I would like to also add that this doesn't really seem valuable. JRE 8 is ancient and support for using it anywhere internet facing is rapidly dwindling in favor of 11,17, and 21. |
@@ -1,5 +1,5 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<manifest package="com.sdk.growthbook" |
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.
Could you please clarify why package was removed?
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 was done to resolve the following warning during build time:
> Task :NetworkDispatcherKtor:processDebugManifest
package="com.sdk.growthbook" found in source AndroidManifest.xml: /home/farmerbb/growthbook-kotlin/NetworkDispatcherKtor/src/androidMain/AndroidManifest.xml.
Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated.
Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace
This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.
Having the package
attribute in the manifest results in an error when using Android Gradle Plugin 8.0.0 or higher.
However, it doesn't matter as much now that we've downgraded back to 7.4.2 for this PR.
This PR adds support for compiling to Kotlin/JS targets.
In order to get compilation working, the following dependencies have been upgraded:
Android Gradle Plugin: 7.4.2 -> 8.7.1JDK: 11 -> 17NOTE: This is a requirement of the Android Gradle Plugin version bump, and does not affect the ability for apps to implement the SDK on earlier Java versions. The Kotlin JVM target is still set to 1.8.