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: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
channel: stable

- name: Check flutter version
run: flutter --version
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test and Lint

on:
push:
branches: [main]
pull_request:
branches:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Build, Lint and Test the SDK
runs-on: macos-26
steps:
- name: Repository checkout
uses: actions/checkout@v5
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "26.1.1"
- name: Install Cocoapods
run: gem install cocoapods
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Install dependencies
run: flutter pub get
- name: Build
run: |
cd example
flutter build ios --release --no-codesign
flutter build macos
flutter build apk
- name: Lint
run: make checklint
- name: Test Android
run: make test-android
- name: Test macOS
run: make test-macos
# todo: add iOS testing (with code signing enabled)
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 3.0.0

- https://github.com/TelemetryDeck/FlutterSDK/releases/tag/3.0.0

- This update introduces the latest features from the native SDKs including:

- it's now possible to set `floatValue`
- added helper methods: acquiredUser, leadStarted, leadConverted, onboardingCompleted, coreFeatureUsed, paywallShown, purchaseCompleted, referralSent, userRatingSubmitted and errorOccurred

- [Android] Gradle Kotlin 2.2.20 and Gradle 8.14

## 2.5.0

- https://github.com/TelemetryDeck/FlutterSDK/releases/tag/2.5.0
Expand Down
44 changes: 44 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.PHONY: help get test analyze checklint lint example-get example-test clean test-all test-android test-ios test-macos test-native

help:
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'


analyze: ## Run static analysis
@flutter analyze

checklint: ## Checks the project for linting errors, used by the CI
@dart format lib test --set-exit-if-changed

clean: ## Clean build artifacts
@flutter clean

example-get: ## Install example app dependencies
@cd example && flutter pub get

get: ## Install dependencies
@flutter pub get

lint: ## Applies all auto-correctable lint issues and reformats all source files
@dart format lib test

test: ## Run unit tests
@flutter test

test-all: ## Run all tests (Dart + native bridges)
@$(MAKE) test
@$(MAKE) test-native

test-android: ## Run Android native bridge tests
@cd example/android && ./gradlew telemetrydecksdk:testDebugUnitTest

test-ios: ## Run iOS native bridge tests
@xcodebuild test -workspace example/ios/Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=26.1,name=iPhone 17' -quiet

test-macos: ## Run macOS native bridge tests
@xcodebuild test -workspace example/macos/Runner.xcworkspace -scheme Runner -destination 'platform=macOS' -quiet

test-native: ## Run all native bridge tests (iOS, macOS, Android)
@$(MAKE) test-ios
@$(MAKE) test-macos
@$(MAKE) test-android
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Flutter SDK depends on the latest major version of the native SDKs. This is
On Android, the dependency is configured in `android/build.gradle`:

```
implementation 'com.telemetrydeck:kotlin-sdk:2.2.0'
implementation 'com.telemetrydeck:kotlin-sdk:6.3.0'
```

On iOS, the dependency is configured in `ios/telemetrydecksdk.podspec` using the podspect Dependency format `s.dependency 'TelemetryClient', '~> 2.0'`.
Expand Down
38 changes: 18 additions & 20 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 = '1.9.24'
ext.kotlin_version = '2.2.20'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.1.0'
classpath 'com.android.tools.build:gradle:8.11.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -29,15 +29,15 @@ android {
namespace 'com.telemetrydeck.telemetrydecksdk'
}

compileSdkVersion 33
compileSdk = 36

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = JavaVersion.VERSION_17
}

sourceSets {
Expand All @@ -49,21 +49,19 @@ android {
minSdkVersion 21
}

dependencies {
implementation 'com.telemetrydeck:kotlin-sdk:6.1.0'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation 'org.mockito:mockito-core:5.0.0'
}

testOptions {
unitTests.all {
useJUnitPlatform()

testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
showStandardStreams = true
}
unitTests {
includeAndroidResources = true
returnDefaultValues = true
}
}
}

dependencies {
implementation 'com.telemetrydeck:kotlin-sdk:6.3.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 'androidx.arch.core:core-testing:2.2.0'
}
Loading