Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "26.1.1"
xcode-version: "26.5.0"
- name: Install Cocoapods
run: gem install cocoapods
- name: Setup Flutter
Expand Down
22 changes: 12 additions & 10 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'com.telemetrydeck.telemetrydecksdk'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '2.2.20'
ext.kotlin_version = '2.3.21'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.11.1'
classpath 'com.android.tools.build:gradle:9.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -36,17 +36,13 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}

defaultConfig {
minSdkVersion 21
minSdkVersion 23
}

testOptions {
Expand All @@ -57,11 +53,17 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

dependencies {
implementation 'com.telemetrydeck:kotlin-sdk:6.3.0'
implementation 'com.telemetrydeck:kotlin-sdk:7.0.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation 'org.jetbrains.kotlin:kotlin-reflect:2.2.20'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3'
testImplementation 'org.jetbrains.kotlin:kotlin-reflect:2.3.21'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2'
testImplementation 'androidx.arch.core:core-testing:2.2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ import android.content.Context
import com.telemetrydeck.sdk.PurchaseEvent
import com.telemetrydeck.sdk.PurchaseType
import com.telemetrydeck.sdk.TelemetryDeck
import com.telemetrydeck.sdk.TelemetryDeckProvider
import com.telemetrydeck.sdk.params.ErrorCategory
import com.telemetrydeck.sdk.providers.AccessibilityProvider
import com.telemetrydeck.sdk.providers.CalendarParameterProvider
import com.telemetrydeck.sdk.providers.DefaultParameterProvider
import com.telemetrydeck.sdk.providers.DefaultPrefixProvider
import com.telemetrydeck.sdk.providers.EnvironmentParameterProvider
import com.telemetrydeck.sdk.providers.PlatformContextProvider
import io.flutter.embedding.engine.plugins.FlutterPlugin
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
Expand Down Expand Up @@ -524,7 +529,7 @@ class TelemetrydecksdkPlugin : FlutterPlugin, MethodCallHandler {
}

if (defaultParameters != null) {
builder.addProvider(DefaultParameterProvider(defaultParameters))
builder.providers(listOf(DefaultParameterProvider(defaultParameters)) + nativeEnrichmentProviders())
}

val application = applicationContext as Application
Expand All @@ -535,6 +540,13 @@ class TelemetrydecksdkPlugin : FlutterPlugin, MethodCallHandler {
}
}

private fun nativeEnrichmentProviders(): List<TelemetryDeckProvider> = listOf(
EnvironmentParameterProvider(),
PlatformContextProvider(),
AccessibilityProvider(),
CalendarParameterProvider(),
)

override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
channel.setMethodCallHandler(null)
}
Expand Down
12 changes: 8 additions & 4 deletions example/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.application")
id("kotlin-android")
Expand All @@ -15,10 +17,6 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.telemetrydecksdk_example"
Expand All @@ -39,6 +37,12 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
}
}

flutter {
source = "../.."
}
6 changes: 5 additions & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
kotlin.code.style=official
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-all.zip
4 changes: 2 additions & 2 deletions example/android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ pluginManagement {

plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
id("com.android.application") version "9.2.1" apply false
id("org.jetbrains.kotlin.android") version "2.3.21" apply false
}

include(":app")
24 changes: 12 additions & 12 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
version: "1.4.0"
version: "1.4.1"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -134,26 +134,26 @@ packages:
dependency: transitive
description:
name: matcher
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
url: "https://pub.dev"
source: hosted
version: "0.12.17"
version: "0.12.19"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
url: "https://pub.dev"
source: hosted
version: "0.11.1"
version: "0.13.0"
meta:
dependency: transitive
description:
name: meta
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.18.0"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -237,7 +237,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.5.0"
version: "3.0.0"
term_glyph:
dependency: transitive
description:
Expand All @@ -250,10 +250,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
url: "https://pub.dev"
source: hosted
version: "0.7.7"
version: "0.7.11"
vector_math:
dependency: transitive
description:
Expand All @@ -279,5 +279,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=3.8.0 <4.0.0"
dart: ">=3.10.0-0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
Loading