From e9d4ec38d9913b1fe5934a4d2c50af4e19ba0dd6 Mon Sep 17 00:00:00 2001 From: Ahmed TARAFI Date: Mon, 12 Jun 2023 10:44:50 +0200 Subject: [PATCH] release: 4.2.0 --- .../Plugins/Android/launcherTemplate.gradle | 7 +++-- .../Android/launcherTemplate2019.gradle | 9 +++---- Assets/Plugins/Android/mainTemplate.gradle | 6 ++--- .../Plugins/Android/mainTemplate2019.gradle | 6 ++--- README.md | 27 ++++++++++++++++--- 5 files changed, 35 insertions(+), 20 deletions(-) diff --git a/Assets/Plugins/Android/launcherTemplate.gradle b/Assets/Plugins/Android/launcherTemplate.gradle index b967d53..a1a04e1 100644 --- a/Assets/Plugins/Android/launcherTemplate.gradle +++ b/Assets/Plugins/Android/launcherTemplate.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.20' + ext.kotlin_version = '1.8.0' repositories { google() @@ -7,7 +7,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.0' + classpath 'com.android.tools.build:gradle:4.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } @@ -60,7 +60,6 @@ android { buildTypes { debug { - minifyEnabled **MINIFY_DEBUG** proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG** jniDebuggable true } @@ -81,4 +80,4 @@ android { enableSplit = true } } -}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP** +}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP** \ No newline at end of file diff --git a/Assets/Plugins/Android/launcherTemplate2019.gradle b/Assets/Plugins/Android/launcherTemplate2019.gradle index 50cb8db..b9f833f 100644 --- a/Assets/Plugins/Android/launcherTemplate2019.gradle +++ b/Assets/Plugins/Android/launcherTemplate2019.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.20' + ext.kotlin_version = '1.8.0' repositories { google() @@ -7,7 +7,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.0' + classpath 'com.android.tools.build:gradle:4.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } @@ -60,14 +60,11 @@ android { buildTypes { debug { - minifyEnabled **MINIFY_DEBUG** - useProguard **PROGUARD_DEBUG** proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG** jniDebuggable true } release { minifyEnabled **MINIFY_RELEASE** - useProguard **PROGUARD_RELEASE** proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG** } }**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS** @@ -83,4 +80,4 @@ android { enableSplit = true } } -}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP** +}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP** \ No newline at end of file diff --git a/Assets/Plugins/Android/mainTemplate.gradle b/Assets/Plugins/Android/mainTemplate.gradle index 116d062..aa3fc9e 100644 --- a/Assets/Plugins/Android/mainTemplate.gradle +++ b/Assets/Plugins/Android/mainTemplate.gradle @@ -1,6 +1,6 @@ buildscript { - ext.kotlin_version = '1.6.20' + ext.kotlin_version = '1.8.0' repositories { google() @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.0' + classpath 'com.android.tools.build:gradle:4.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } @@ -62,4 +62,4 @@ android { }**REPOSITORIES** **IL_CPP_BUILD_SETUP** **SOURCE_BUILD_SETUP** -**EXTERNAL_SOURCES** +**EXTERNAL_SOURCES** \ No newline at end of file diff --git a/Assets/Plugins/Android/mainTemplate2019.gradle b/Assets/Plugins/Android/mainTemplate2019.gradle index 2755a53..c73b982 100644 --- a/Assets/Plugins/Android/mainTemplate2019.gradle +++ b/Assets/Plugins/Android/mainTemplate2019.gradle @@ -1,6 +1,6 @@ buildscript { - ext.kotlin_version = '1.6.20' + ext.kotlin_version = '1.8.0' repositories { google() @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.0' + classpath 'com.android.tools.build:gradle:4.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } @@ -59,4 +59,4 @@ android { ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~" }**PACKAGING_OPTIONS** }**REPOSITORIES****SOURCE_BUILD_SETUP** -**EXTERNAL_SOURCES** +**EXTERNAL_SOURCES** \ No newline at end of file diff --git a/README.md b/README.md index 95c4cc9..f4f3c99 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ CrossDK for Unity is available with iOS 11 minimal target version, but the `Cros **Android API** version **>= API 21** -The Android version is using **Kotlin 1.6.20**, **Gradle 6.1.1** and **Gradle plugin 3.6.0**, it may conflict with other versions if you use some in your project. +The Android version is using **Kotlin 1.8.0**, **Gradle 6.8.3** and **Gradle plugin 4.2.2** ## Installation @@ -35,7 +35,7 @@ If you already use CocoaPods in your Unity project, you should consider adding y ### Android using Github Packages - You can download manually the CrossDK's release package `crossdk-android-X.X.X.aar` directly from - our [Github package registry page] (https://github.com/orgs/Adikteev/packages) + our [Github package registry page](https://github.com/Adikteev/crossdk-android/packages/1513405) - Place the release package inside the folder `Assets\Plugins\Android` - If you are using Unity 2019, you also need do delete the files `launcherTemplate.gradle` and `mainTemplate.gradle` in the folder `Assets\Plugins\Android` and to rename `launcherTemplate2019.gradle` to `launcherTemplate.gradle` and `mainTemplate2019.gradle` to `mainTemplate.gradle`. @@ -45,7 +45,7 @@ To use CrossDK in your Unity project, you must download the `CrossDK.unitypackag ### Android specific configuration -- To make sure you are using Gradle 6.1.1, you can open the preferences menu (Edit > Preferences > External Tools) and set the Gradle path to a folder with Gradle 6.1.1 installed (you can download it here: https://gradle.org/releases/). +- Android sdk requires Gradle 6.8.3 or higher, you can open the preferences menu in the unity editor (Edit > Preferences > External Tools) and set the Gradle path to a folder with Gradle 6.8.3 or higher (you can download it here: https://gradle.org/releases/). - If you are using Unity 2019, you also need to delete the files `launcherTemplate.gradle` and `mainTemplate.gradle` in the folder `Assets\Plugins\Android` and to rename `launcherTemplate2019.gradle` to `launcherTemplate.gradle` and `mainTemplate2019.gradle` to `mainTemplate.gradle`. ### Common configuration @@ -187,6 +187,25 @@ public class CrossDKDelegatesSample : MonoBehaviour } } ``` -You can check the [crossdk-ios](https://github.com/Adikteev/crossdk-ios) and the [crossdk-android](https://github.com/Adikteev/crossdk-android) repositories to know more about the available delegate for each platforms. +## Debug + +You can enable logs for the cross promotion sdk by setting the log level to verbose, error or none using the following method: + +```csharp +using UnityEngine; +using CrossDK; + +void Awake() + { + CrossDKSingleton.SetDebugMode(DebugLevel.Verbose); + } +``` +- `DebugLevel.Verbose`: for verbose logging +- `DebugLevel.Error`: for error logging +- `DebugLevel.None`: for disabling logger + +> We recommend setting up this config before initializing the SDK. + +You can check the [crossdk-ios](https://github.com/Adikteev/crossdk-ios) and the [crossdk-android](https://github.com/Adikteev/crossdk-android) repositories for more details. That’s all you need to know!