diff --git a/.github/workflows/embrace.yaml b/.github/workflows/embrace.yaml index c8646556..54396055 100644 --- a/.github/workflows/embrace.yaml +++ b/.github/workflows/embrace.yaml @@ -32,7 +32,7 @@ jobs: uses: ./.github/workflows/flutter_ci.yaml with: flutter_channel: stable - flutter_version: '3.35.4' + flutter_version: '3.38.5' working_directory: embrace # Run tests on minimum supported version @@ -47,7 +47,7 @@ jobs: persist-credentials: false - uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0 with: - flutter-version: '3.35.4' + flutter-version: '3.38.5' - name: Flutter Doctor run: flutter doctor -v - name: Tests for minimum version @@ -64,6 +64,10 @@ jobs: with: persist-credentials: false - uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0 + with: + channel: stable + flutter-version: '3.38.5' + cache: true - name: Flutter Doctor run: flutter doctor -v - name: Tests for release mode @@ -80,6 +84,17 @@ jobs: working-directory: embrace/example steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + with: + tool-cache: false + android: false + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + - name: Checkout uses: actions/checkout@v6 with: @@ -103,10 +118,11 @@ jobs: with: channel: stable cache: true + flutter-version: '3.38.5' - name: Flutter pub get run: flutter pub get - + - name: Accept Android SDK licenses run: yes | "${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" --licenses || true @@ -161,7 +177,8 @@ jobs: adb devices || true flutter --version flutter devices || true - flutter test integration_test -d emulator-5554 || { adb logcat -d > emulator_logcat.log 2>&1 || true; exit 127; } + flutter test -d emulator-5554 integration_test/app_test.dart + adb logcat -d > emulator_logcat.log 2>&1 || true - name: Archive Test Results if: ${{ always() }} diff --git a/embrace/example/android/app/build.gradle b/embrace/example/android/app/build.gradle index 3b7776c9..15788acf 100644 --- a/embrace/example/android/app/build.gradle +++ b/embrace/example/android/app/build.gradle @@ -4,7 +4,7 @@ plugins { id "dev.flutter.flutter-gradle-plugin" } -apply plugin: "embrace-swazzler" +apply plugin: "io.embrace.gradle" def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') diff --git a/embrace/example/android/app/src/main/embrace-config.json b/embrace/example/android/app/src/main/embrace-config.json index e6b5441d..37ae08c9 100644 --- a/embrace/example/android/app/src/main/embrace-config.json +++ b/embrace/example/android/app/src/main/embrace-config.json @@ -1,5 +1,8 @@ { "app_id": "YOUR_APP_ID", "api_token": "YOUR_API_TOKEN", - "ndk_enabled": true -} + "ndk_enabled": true, + "sdk_config": { + "app_framework": "flutter" + } + } \ No newline at end of file diff --git a/embrace/example/android/build.gradle b/embrace/example/android/build.gradle index 3829b0d2..e0ca024e 100644 --- a/embrace/example/android/build.gradle +++ b/embrace/example/android/build.gradle @@ -6,10 +6,11 @@ buildscript { } dependencies { - classpath "io.embrace:embrace-swazzler:${findProject(':embrace_android').properties['emb_android_sdk']}" + classpath "io.embrace:embrace-gradle-plugin:${findProject(':embrace_android').properties['emb_android_sdk']}" classpath 'com.android.tools.build:gradle:8.13.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } + } allprojects { diff --git a/embrace/example/integration_test/app_test.dart b/embrace/example/integration_test/app_test.dart index 1aca766a..a1397fac 100644 --- a/embrace/example/integration_test/app_test.dart +++ b/embrace/example/integration_test/app_test.dart @@ -7,7 +7,6 @@ void main() { group('E2E', () { testWidgets('smokeTest', (tester) async { - // checks the example app runs await app.main(); await tester.pumpAndSettle(const Duration(seconds: 3)); await tester.ensureVisible(find.text('Errors')); diff --git a/embrace_android/android/gradle.properties b/embrace_android/android/gradle.properties index 8ff7bdaa..67c2070c 100644 --- a/embrace_android/android/gradle.properties +++ b/embrace_android/android/gradle.properties @@ -1 +1 @@ -emb_android_sdk=7.9.3 +emb_android_sdk=8.0.0 diff --git a/embrace_android/android/src/main/kotlin/io/embrace/flutter/EmbracePlugin.kt b/embrace_android/android/src/main/kotlin/io/embrace/flutter/EmbracePlugin.kt index f8171538..5e3d5a00 100644 --- a/embrace_android/android/src/main/kotlin/io/embrace/flutter/EmbracePlugin.kt +++ b/embrace_android/android/src/main/kotlin/io/embrace/flutter/EmbracePlugin.kt @@ -11,7 +11,6 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler import io.flutter.plugin.common.MethodChannel.Result import io.embrace.android.embracesdk.Embrace -import io.embrace.android.embracesdk.AppFramework import io.embrace.android.embracesdk.network.http.HttpMethod import io.embrace.android.embracesdk.internal.EmbraceInternalApi import io.embrace.android.embracesdk.internal.FlutterInternalInterface @@ -278,10 +277,10 @@ public class EmbracePlugin : FlutterPlugin, MethodCallHandler { } private fun handleAttachSdkCall(call: MethodCall, result: Result) : Unit { - val started = Embrace.getInstance().isStarted + val started = Embrace.isStarted if (!started) { - Embrace.getInstance().start(context, AppFramework.FLUTTER) + Embrace.start(context) } safeFlutterInterfaceCall { diff --git a/embrace_dio/example/android/app/build.gradle b/embrace_dio/example/android/app/build.gradle index c916658e..489cacd3 100644 --- a/embrace_dio/example/android/app/build.gradle +++ b/embrace_dio/example/android/app/build.gradle @@ -24,7 +24,7 @@ if (flutterVersionName == null) { apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" -apply plugin: 'embrace-swazzler' +apply plugin: 'io.embrace.gradle' android { namespace "com.example.example" diff --git a/embrace_dio/example/android/build.gradle b/embrace_dio/example/android/build.gradle index 4119d2b7..4a74ef50 100644 --- a/embrace_dio/example/android/build.gradle +++ b/embrace_dio/example/android/build.gradle @@ -8,7 +8,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:8.13.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "io.embrace:embrace-swazzler:${findProject(':embrace_android').properties['emb_android_sdk']}" + classpath "io.embrace:io.embrace.gradle:${findProject(':embrace_android').properties['emb_android_sdk']}" } } diff --git a/embrace_platform_interface/lib/method_channel_embrace.dart b/embrace_platform_interface/lib/method_channel_embrace.dart index 125b2141..0fb479bb 100644 --- a/embrace_platform_interface/lib/method_channel_embrace.dart +++ b/embrace_platform_interface/lib/method_channel_embrace.dart @@ -111,7 +111,7 @@ class MethodChannelEmbrace extends EmbracePlatform { /// Minimum Embrace Android SDK version compatible with this version of /// the Embrace Flutter SDK - static const String minimumAndroidVersion = '7.9.3'; + static const String minimumAndroidVersion = '8.0.0'; /// The method channel used to interact with the native platform. @visibleForTesting