Skip to content
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

Merged
merged 10 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 27 additions & 25 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ env:
jobs:
build-smartype:
name: "Build Smartype"
runs-on: macOS-latest
runs-on: macOS-14
Copy link
Member Author

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

Copy link
Contributor

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
Copy link
Member Author

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

Copy link
Contributor

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
Copy link
Member Author

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.

uses: actions/setup-java@v1
with:
java-version: 1.15
java-version: 1.17
- 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'
Copy link
Member Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- name: Publish all
run: ./gradlew publishToMavenLocal
env:
Expand Down Expand Up @@ -56,14 +56,14 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: set up JDK 1.15
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.15
java-version: 1.17
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '20.x'
- name: pre-create maven dir
run: |
mkdir -p ~/.m2/repository/com/mparticle
Expand Down Expand Up @@ -102,14 +102,14 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: set up JDK 1.15
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.15
java-version: 1.17
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '20.x'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: pre-create maven dir
Expand Down Expand Up @@ -144,25 +144,25 @@ jobs:
defaults:
run:
working-directory: examples/iosExample
runs-on: macOS-latest
runs-on: macOS-14

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7
with:
ruby-version: '3.1.0'
- uses: actions/checkout@v2
- name: set up JDK 1.15
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.15
java-version: 1.17
- 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'
- name: pre-create maven dir
run: |
mkdir -p ~/.m2/repository/com/mparticle
Expand All @@ -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
Copy link
Member Author

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

run: pod update; xcodebuild -workspace SmartypeExample.xcworkspace -scheme SmartypeExample -destination 'platform=iOS Simulator,name=iPhone 15,OS=latest'
generate-all:
name: "Generate, All Platforms "
needs: build-smartype
runs-on: macos-latest
runs-on: macos-14

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7
with:
ruby-version: '3.1.0'
- uses: actions/checkout@v2
- name: set up JDK 1.15
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.15
java-version: 1.17
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '20.x'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install Cocoapods
Expand Down Expand Up @@ -236,24 +238,24 @@ jobs:

publish:
name: "Publish"
runs-on: macOS-latest
runs-on: macOS-14
if: github.ref == 'refs/heads/main'
needs: [build-web-example, build-ios-example, build-android-example, generate-all]

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7
with:
ruby-version: '3.1.0'

- name: Checkout
uses: actions/checkout@v2

- name: set up JDK 1.15
- name: set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.15
java-version: 1.17
- name: Install Cocoapods
run: sudo gem install cocoapods; sudo gem install cocoapods-generate

Expand Down
5 changes: 0 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ allprojects {
mavenCentral()
google()
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}
extra["signing.keyId"] = System.getenv("mavenSigningKeyId")
extra["signing.secretKeyRingFile"] = System.getenv("mavenSigningKeyRingFile")
extra["signing.password"] = System.getenv("mavenSigningKeyPassword")
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`kotlin-dsl`
kotlin("jvm") version "1.8.21"
kotlin("jvm") version "1.9.22"
}

repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_15
targetCompatibility = JavaVersion.VERSION_15
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinDslPluginOptions {
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
object versions {
const val kotlin = "1.8.21"
const val kotlin = "1.9.22"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this 1 line is what triggered basically every other line :-)

const val dokka = "1.5.0"
const val spotless = "6.17.0"
const val serialization = "1.5.0"
const val serialization = "1.6.2"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical library we use everywhere, needed for support of latest kotlin

}

object deps {
object android {
const val gradlePlugin = "com.android.tools.build:gradle:7.1.0"
const val gradlePlugin = "com.android.tools.build:gradle:8.2.2"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we were long past due to upgrade, esp to support latest Android build tools/targets

}
object mparticle {
const val androidSdk = "com.mparticle:android-core:5.36.2"
const val androidSdk = "com.mparticle:android-core:5.55.0"
const val webSdk = "@mparticle/web-sdk"
}
}
2 changes: 1 addition & 1 deletion examples/androidExample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.8.21'
ext.kotlin_version = '1.9.22'
repositories {
google()
mavenCentral()
Expand Down
1 change: 0 additions & 1 deletion examples/iosExample/Cartfile
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i switched over to cocoapods since Carthage is a dying ecosystem and I was having trouble getting the build working properly with our own Apple SDK & carthage

This file was deleted.

10 changes: 10 additions & 0 deletions examples/iosExample/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'SmartypeExample' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for SmartypeExample
pod 'mParticle-Apple-SDK', '~> 8'
end
53 changes: 45 additions & 8 deletions examples/iosExample/SmartypeExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand All @@ -13,10 +13,10 @@
042EF62F242A349200A10FF5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 042EF62E242A349200A10FF5 /* Assets.xcassets */; };
042EF632242A349200A10FF5 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 042EF631242A349200A10FF5 /* Preview Assets.xcassets */; };
042EF635242A349200A10FF5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 042EF633242A349200A10FF5 /* LaunchScreen.storyboard */; };
042EF64A242A3B4000A10FF5 /* mParticle_Apple_SDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 042EF649242A3B4000A10FF5 /* mParticle_Apple_SDK.framework */; };
04DA4CEB29E4F64E00A1FE37 /* Smartype.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04DA4CEA29E4F64E00A1FE37 /* Smartype.xcframework */; };
04DA4CEC29E4F64E00A1FE37 /* Smartype.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04DA4CEA29E4F64E00A1FE37 /* Smartype.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
04EB02D4255987F3004F5B6C /* smartype-dist in Resources */ = {isa = PBXBuildFile; fileRef = 04EB02D3255987F3004F5B6C /* smartype-dist */; };
232DD8742E92F3590CA52BEC /* Pods_SmartypeExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725C65CCA56D725A09133F49 /* Pods_SmartypeExample.framework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -45,6 +45,9 @@
042EF649242A3B4000A10FF5 /* mParticle_Apple_SDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = mParticle_Apple_SDK.framework; path = Carthage/Build/iOS/mParticle_Apple_SDK.framework; sourceTree = SOURCE_ROOT; };
04DA4CEA29E4F64E00A1FE37 /* Smartype.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Smartype.xcframework; path = "smartype-dist/ios/Smartype.xcframework"; sourceTree = "<group>"; };
04EB02D3255987F3004F5B6C /* smartype-dist */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "smartype-dist"; sourceTree = "<group>"; };
725C65CCA56D725A09133F49 /* Pods_SmartypeExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SmartypeExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BA2153820C6305FAA90A88AC /* Pods-SmartypeExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmartypeExample.debug.xcconfig"; path = "Target Support Files/Pods-SmartypeExample/Pods-SmartypeExample.debug.xcconfig"; sourceTree = "<group>"; };
BDEAE790EC5A3BAF7245A8F1 /* Pods-SmartypeExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmartypeExample.release.xcconfig"; path = "Target Support Files/Pods-SmartypeExample/Pods-SmartypeExample.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -53,7 +56,7 @@
buildActionMask = 2147483647;
files = (
04DA4CEB29E4F64E00A1FE37 /* Smartype.xcframework in Frameworks */,
042EF64A242A3B4000A10FF5 /* mParticle_Apple_SDK.framework in Frameworks */,
232DD8742E92F3590CA52BEC /* Pods_SmartypeExample.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -67,6 +70,7 @@
042EF627242A349000A10FF5 /* SmartypeExample */,
042EF626242A349000A10FF5 /* Products */,
042EF63C242A34ED00A10FF5 /* Frameworks */,
E2DF822209F8F9F98759DE19 /* Pods */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -105,22 +109,33 @@
isa = PBXGroup;
children = (
04DA4CEA29E4F64E00A1FE37 /* Smartype.xcframework */,
725C65CCA56D725A09133F49 /* Pods_SmartypeExample.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
E2DF822209F8F9F98759DE19 /* Pods */ = {
isa = PBXGroup;
children = (
BA2153820C6305FAA90A88AC /* Pods-SmartypeExample.debug.xcconfig */,
BDEAE790EC5A3BAF7245A8F1 /* Pods-SmartypeExample.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
042EF624242A349000A10FF5 /* SmartypeExample */ = {
isa = PBXNativeTarget;
buildConfigurationList = 042EF639242A349200A10FF5 /* Build configuration list for PBXNativeTarget "SmartypeExample" */;
buildPhases = (
BFD2BFCDFBE30336AB31596A /* [CP] Check Pods Manifest.lock */,
042EF621242A349000A10FF5 /* Sources */,
042EF622242A349000A10FF5 /* Frameworks */,
042EF623242A349000A10FF5 /* Resources */,
042EF64D242A3BAE00A10FF5 /* ShellScript */,
04DA4CE929E4F5FA00A1FE37 /* Embed Frameworks */,
843D336766C3AC1D51B254C5 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -179,24 +194,44 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
042EF64D242A3BAE00A10FF5 /* ShellScript */ = {
843D336766C3AC1D51B254C5 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SmartypeExample/Pods-SmartypeExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SmartypeExample/Pods-SmartypeExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SmartypeExample/Pods-SmartypeExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
BFD2BFCDFBE30336AB31596A /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/mParticle_Apple_SDK.framework",
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/mParticle_Apple_SDK.framework",
"$(DERIVED_FILE_DIR)/Pods-SmartypeExample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -343,6 +378,7 @@
};
042EF63A242A349200A10FF5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = BA2153820C6305FAA90A88AC /* Pods-SmartypeExample.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
Expand Down Expand Up @@ -370,6 +406,7 @@
};
042EF63B242A349200A10FF5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = BDEAE790EC5A3BAF7245A8F1 /* Pods-SmartypeExample.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
Expand Down
Loading
Loading