Skip to content

Commit

Permalink
Merge pull request #151 from adjust/v503
Browse files Browse the repository at this point in the history
Version 5.0.3
  • Loading branch information
uerceg authored Dec 5, 2024
2 parents 71c4742 + 7f1a72b commit b88a3e9
Show file tree
Hide file tree
Showing 21 changed files with 92 additions and 78 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
- [[email protected]][ios_sdk_v5.0.1]
- [[email protected]][android_sdk_v5.0.2]

---

### Version 5.0.2 (23rd September 2024)
#### Fixed
- Fixed `Adjust.modulemap not found` error in certain CocoaPods integration cases.
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.2
5.0.3
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ android {
}

dependencies {
implementation 'com.adjust.sdk:adjust-android:5.0.1'
implementation 'com.adjust.sdk:adjust-android:5.0.2'
}
2 changes: 1 addition & 1 deletion ios/adjust_sdk.podspec
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/adjust.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 2 additions & 1 deletion test/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ rootProject.allprojects {
apply plugin: 'com.android.library'

android {
compileSdkVersion 32
namespace 'com.adjust.test.lib'
compileSdkVersion 35

defaultConfig {
minSdkVersion 16
Expand Down
3 changes: 1 addition & 2 deletions test/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.adjust.test.lib">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
36 changes: 5 additions & 31 deletions test/android/src/main/java/com/adjust/test/lib/TestLibPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
25 changes: 16 additions & 9 deletions test/app/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -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()) {
Expand All @@ -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) {
Expand All @@ -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'
Expand All @@ -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
}
Expand Down
3 changes: 1 addition & 2 deletions test/app/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.adjust.app">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
3 changes: 1 addition & 2 deletions test/app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.adjust.app">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
Expand Down
3 changes: 1 addition & 2 deletions test/app/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.adjust.app">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
22 changes: 11 additions & 11 deletions test/app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/app/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
38 changes: 31 additions & 7 deletions test/app/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
2 changes: 1 addition & 1 deletion test/app/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
4 changes: 2 additions & 2 deletions test/app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class _MyAppState extends State<MyApp> {
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;
Expand Down
2 changes: 1 addition & 1 deletion test/ios/test_lib.podspec
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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 ([email protected])

environment:
Expand Down

0 comments on commit b88a3e9

Please sign in to comment.