From 4032cd019ed116366525907b1c4babb137d1e2b2 Mon Sep 17 00:00:00 2001 From: uerceg Date: Thu, 5 Dec 2024 22:59:30 +0100 Subject: [PATCH 1/5] feat: update version number to 5.0.3 --- VERSION | 2 +- ios/adjust_sdk.podspec | 2 +- lib/adjust.dart | 2 +- pubspec.yaml | 2 +- test/ios/test_lib.podspec | 2 +- test/pubspec.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index a1ef0ca..50e2274 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.0.2 +5.0.3 diff --git a/ios/adjust_sdk.podspec b/ios/adjust_sdk.podspec index 9a24d5f..270abe7 100644 --- a/ios/adjust_sdk.podspec +++ b/ios/adjust_sdk.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'adjust_sdk' - s.version = '5.0.2' + s.version = '5.0.3' s.summary = 'Adjust Flutter SDK for iOS platform' s.description = <<-DESC Adjust Flutter SDK for iOS platform. diff --git a/lib/adjust.dart b/lib/adjust.dart index eef3b19..ea8986b 100644 --- a/lib/adjust.dart +++ b/lib/adjust.dart @@ -24,7 +24,7 @@ import 'package:flutter/services.dart'; import 'package:meta/meta.dart'; class Adjust { - static const String _sdkPrefix = 'flutter5.0.2'; + static const String _sdkPrefix = 'flutter5.0.3'; static const MethodChannel _channel = const MethodChannel('com.adjust.sdk/api'); diff --git a/pubspec.yaml b/pubspec.yaml index 9484eee..c93f9a9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: adjust_sdk description: This is the Flutter SDK of Adjust™. You can read more about Adjust™ at adjust.com. homepage: https://github.com/adjust/flutter_sdk -version: 5.0.2 +version: 5.0.3 environment: sdk: ">=2.12.0 <3.0.0" diff --git a/test/ios/test_lib.podspec b/test/ios/test_lib.podspec index a5877b8..31bf64a 100644 --- a/test/ios/test_lib.podspec +++ b/test/ios/test_lib.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'test_lib' - s.version = '5.0.2' + s.version = '5.0.3' s.summary = 'Adjust test library for iOS platform' s.description = <<-DESC Adjust test library for iOS platform. diff --git a/test/pubspec.yaml b/test/pubspec.yaml index 576dc23..ba5e0cd 100644 --- a/test/pubspec.yaml +++ b/test/pubspec.yaml @@ -1,6 +1,6 @@ name: test_lib description: Flutter plugin for Adjust Testing Library. Intended exclusively for internal use. -version: 5.0.2 +version: 5.0.3 author: Adjust (sdk@adjust.com) environment: From 9646c6757ad86c909c4f14f6ab7a7c4040b1f96a Mon Sep 17 00:00:00 2001 From: uerceg Date: Thu, 5 Dec 2024 23:00:09 +0100 Subject: [PATCH 2/5] build: update native android sdk to 5.0.2 --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 0585cc3..1e7b17f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -37,5 +37,5 @@ android { } dependencies { - implementation 'com.adjust.sdk:adjust-android:5.0.1' + implementation 'com.adjust.sdk:adjust-android:5.0.2' } From 336f53e38c71f3cb54672f93ce08612de4e7aab8 Mon Sep 17 00:00:00 2001 From: uerceg Date: Thu, 5 Dec 2024 23:46:16 +0100 Subject: [PATCH 3/5] test: update android test app --- test/android/build.gradle | 3 +- test/android/src/main/AndroidManifest.xml | 3 +- .../com/adjust/test/lib/TestLibPlugin.java | 36 +++--------------- test/app/android/app/build.gradle | 25 +++++++----- .../android/app/src/debug/AndroidManifest.xml | 3 +- .../android/app/src/main/AndroidManifest.xml | 3 +- .../app/src/profile/AndroidManifest.xml | 3 +- test/app/android/build.gradle | 22 +++++------ .../gradle/wrapper/gradle-wrapper.properties | 2 +- test/app/android/settings.gradle | 38 +++++++++++++++---- test/app/lib/main.dart | 4 +- 11 files changed, 72 insertions(+), 70 deletions(-) diff --git a/test/android/build.gradle b/test/android/build.gradle index 3ecbb97..7d22d84 100644 --- a/test/android/build.gradle +++ b/test/android/build.gradle @@ -25,7 +25,8 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 32 + namespace 'com.adjust.test.lib' + compileSdkVersion 35 defaultConfig { minSdkVersion 16 diff --git a/test/android/src/main/AndroidManifest.xml b/test/android/src/main/AndroidManifest.xml index 1c335d7..a2f47b6 100644 --- a/test/android/src/main/AndroidManifest.xml +++ b/test/android/src/main/AndroidManifest.xml @@ -1,3 +1,2 @@ - + diff --git a/test/android/src/main/java/com/adjust/test/lib/TestLibPlugin.java b/test/android/src/main/java/com/adjust/test/lib/TestLibPlugin.java index 1a27069..2659c9f 100644 --- a/test/android/src/main/java/com/adjust/test/lib/TestLibPlugin.java +++ b/test/android/src/main/java/com/adjust/test/lib/TestLibPlugin.java @@ -12,12 +12,13 @@ import android.os.Looper; import android.util.Log; +import androidx.annotation.NonNull; + import io.flutter.embedding.engine.plugins.FlutterPlugin; import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodChannel; import io.flutter.plugin.common.MethodChannel.MethodCallHandler; import io.flutter.plugin.common.MethodChannel.Result; -import io.flutter.plugin.common.PluginRegistry.Registrar; import com.adjust.test.ICommandJsonListener; import com.adjust.test.TestLibrary; @@ -30,50 +31,23 @@ public class TestLibPlugin implements FlutterPlugin, MethodCallHandler { private static String TAG = "TestLibPlugin"; private TestLibrary testLibrary = null; private MethodChannel channel; - private boolean v2Plugin; - private boolean v2Attached = false; - - private TestLibPlugin(MethodChannel channel) { - this.channel = channel; - v2Plugin = false; - } + public TestLibPlugin() {} - public TestLibPlugin() { - v2Plugin = true; - } - - // FlutterPlugin @Override - public void onAttachedToEngine(FlutterPluginBinding binding) { - if (!v2Plugin) { - return; - } - if (v2Attached) { - return; - } - - v2Attached = true; - + public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) { channel = new MethodChannel(binding.getBinaryMessenger(), "com.adjust.test.lib/api"); channel.setMethodCallHandler(this); } @Override - public void onDetachedFromEngine(FlutterPluginBinding binding) { - v2Attached = false; + public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { if (channel != null) { channel.setMethodCallHandler(null); } channel = null; } - // Plugin registration. - public static void registerWith(Registrar registrar) { - final MethodChannel channel = new MethodChannel(registrar.messenger(), "com.adjust.test.lib/api"); - channel.setMethodCallHandler(new TestLibPlugin(channel)); - } - @Override public void onMethodCall(MethodCall call, Result result) { switch (call.method) { diff --git a/test/app/android/app/build.gradle b/test/app/android/app/build.gradle index c4a37e8..517a139 100644 --- a/test/app/android/app/build.gradle +++ b/test/app/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,10 +12,10 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} +// def flutterRoot = localProperties.getProperty('flutter.sdk') +// if (flutterRoot == null) { +// throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +// } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { @@ -21,12 +27,13 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +// apply plugin: 'com.android.application' +// apply plugin: 'kotlin-android' +// apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 33 + namespace 'com.adjust.app' + compileSdkVersion 35 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -37,7 +44,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.adjust.app" minSdkVersion flutter.minSdkVersion - targetSdkVersion 32 + targetSdkVersion 35 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/test/app/android/app/src/debug/AndroidManifest.xml b/test/app/android/app/src/debug/AndroidManifest.xml index 3cf2e6b..f880684 100644 --- a/test/app/android/app/src/debug/AndroidManifest.xml +++ b/test/app/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/test/app/android/app/src/main/AndroidManifest.xml b/test/app/android/app/src/main/AndroidManifest.xml index 3cace77..ef70962 100644 --- a/test/app/android/app/src/main/AndroidManifest.xml +++ b/test/app/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/test/app/android/build.gradle b/test/app/android/build.gradle index 859edc8..aed4dbe 100644 --- a/test/app/android/build.gradle +++ b/test/app/android/build.gradle @@ -1,15 +1,15 @@ -buildscript { - ext.kotlin_version = '1.6.10' - repositories { - google() - mavenCentral() - } +// buildscript { +// ext.kotlin_version = '1.6.10' +// repositories { +// google() +// mavenCentral() +// } - dependencies { - classpath 'com.android.tools.build:gradle:7.1.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} +// dependencies { +// classpath 'com.android.tools.build:gradle:7.1.1' +// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" +// } +// } allprojects { repositories { diff --git a/test/app/android/gradle/wrapper/gradle-wrapper.properties b/test/app/android/gradle/wrapper/gradle-wrapper.properties index 595fb86..55de1e6 100644 --- a/test/app/android/gradle/wrapper/gradle-wrapper.properties +++ b/test/app/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip diff --git a/test/app/android/settings.gradle b/test/app/android/settings.gradle index 44e62bc..904a85a 100644 --- a/test/app/android/settings.gradle +++ b/test/app/android/settings.gradle @@ -1,11 +1,35 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.1.4" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + include ':app' -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() +// def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +// def properties = new Properties() -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } +// assert localPropertiesFile.exists() +// localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +// def flutterSdkPath = properties.getProperty("flutter.sdk") +// assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +// apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/test/app/lib/main.dart b/test/app/lib/main.dart index edb8a25..848043a 100644 --- a/test/app/lib/main.dart +++ b/test/app/lib/main.dart @@ -26,13 +26,13 @@ class _MyAppState extends State { super.initState(); if (Platform.isAndroid) { - String _address = '192.168.86.80'; + String _address = '192.168.86.151'; String _protocol = 'https'; String _port = '8443'; _overwriteUrl = _protocol + '://' + _address + ':' + _port; _controlUrl = 'ws://' + _address + ':1987'; } else { - String _address = '192.168.86.80'; + String _address = '192.168.86.151'; String _protocol = 'http'; String _port = '8080'; _overwriteUrl = _protocol + '://' + _address + ':' + _port; From a9a8a6e95ad42969cb3ec30920e2101f637bdf1b Mon Sep 17 00:00:00 2001 From: uerceg Date: Thu, 5 Dec 2024 23:58:26 +0100 Subject: [PATCH 4/5] test: update ios test app --- .../ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme | 1 + test/app/ios/Runner/AppDelegate.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/test/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 5e31d3d..c53e2b3 100644 --- a/test/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/test/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -48,6 +48,7 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/test/app/ios/Runner/AppDelegate.swift b/test/app/ios/Runner/AppDelegate.swift index 70693e4..b636303 100644 --- a/test/app/ios/Runner/AppDelegate.swift +++ b/test/app/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, From 7f1a72bbc30eda44ca378d16f1fc088ccd418fe5 Mon Sep 17 00:00:00 2001 From: uerceg Date: Thu, 5 Dec 2024 23:59:27 +0100 Subject: [PATCH 5/5] docs: update changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9a88a1..ab24c03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +### Version 5.0.3 (6th December 2024) +#### Changed +- Switched to native Android SDK version that depends on a specific version of the signature library. + +#### Native SDKs +- [iOS@v5.0.1][ios_sdk_v5.0.1] +- [Android@v5.0.2][android_sdk_v5.0.2] + +--- + ### Version 5.0.2 (23rd September 2024) #### Fixed - Fixed `Adjust.modulemap not found` error in certain CocoaPods integration cases. @@ -516,3 +526,4 @@ In case you were using beta version of the SDK v5, please switch to the official [android_sdk_v4.38.5]: https://github.com/adjust/android_sdk/tree/v4.38.5 [android_sdk_v5.0.0]: https://github.com/adjust/android_sdk/tree/v5.0.0 [android_sdk_v5.0.1]: https://github.com/adjust/android_sdk/tree/v5.0.1 +[android_sdk_v5.0.2]: https://github.com/adjust/android_sdk/tree/v5.0.2