-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: kotlin 1.9.22 #56
Conversation
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 2 New issues |
@@ -11,24 +11,24 @@ env: | |||
jobs: | |||
build-smartype: | |||
name: "Build Smartype" | |||
runs-on: macOS-latest | |||
runs-on: macOS-14 |
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 new on Github - uses ARM machines
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.
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 | ||
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 |
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.
required for ARM-based runners
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.
with: | ||
ruby-version: '3.1.0' | ||
- uses: actions/checkout@v2 | ||
- name: set up JDK 1.15 | ||
- name: set up JDK 1.17 |
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.
With the update to Gradle 8 as well as Kotlin, as well as latest Android build tools, Java 17 or later is recommended.
- name: Install Cocoapods | ||
run: sudo gem install cocoapods; sudo gem install cocoapods-generate | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
node-version: '20.x' |
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.
Also needed for latest mac os
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.
👍
@@ -188,26 +188,28 @@ jobs: | |||
- name: Run Tests | |||
working-directory: test-json | |||
run: bash run-all-tests.sh --platform=ios --jar=../examples/iosExample/smartype.jar | |||
- name: Build iOS app |
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 added the actually building of the iOS app, whereas before we were just generating the framework
@@ -28,11 +28,32 @@ kotlin { | |||
js("js") { | |||
browser() | |||
} | |||
jvm("jvm") {} | |||
android("android") { | |||
jvm("jvm") { |
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.
the below are API changes/updated for the new kotlin 1.9 project structure
@@ -1,5 +1,4 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
package="com.mparticle.smartype.api"> | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> |
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.
deprecated field, replaced by "namespace" (in build.gradle)
pb5.redirectError(ProcessBuilder.Redirect.INHERIT) | ||
val p5 = pb5.start() | ||
p5.waitFor(); | ||
val typescriptDefBuildDir = File(projectDirectory).resolve("build") |
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.
they decided to change where JS outputs distribution files to in Kotlin 1.9, so we need to copy them from a different place to the final output
import kotlin.native.concurrent.freeze | ||
|
||
@OptIn(ExperimentalForeignApi::class) |
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.
required for kotlin 1.9
mParticle = window["mParticle"] | ||
} | ||
var mParticle: mParticle? = null | ||
if (react == null){ |
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 a BUG. flipped the !=
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.
LGTM commented or reacted on everything I was 100% on or found supporting evidence for
@@ -11,24 +11,24 @@ env: | |||
jobs: | |||
build-smartype: | |||
name: "Build Smartype" | |||
runs-on: macOS-latest | |||
runs-on: macOS-14 |
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.
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 | ||
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 |
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.
- name: Install Cocoapods | ||
run: sudo gem install cocoapods; sudo gem install cocoapods-generate | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
node-version: '20.x' |
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.
👍
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.
Nothing on the js/web portion of things seems off base. My approval is based only on those files though, as my smartype knowledge is not as in depth as the other reviewers.
Summary
This PR updates to the latest Kotlin Multiplatfom version (1.9.22) for better support for Mac M1 (and other goodies that come along with latest Kotlin such as performance improvements..). That then required updating various other things:
Testing Plan
Reference Issue