diff --git a/unity/Assets/Plugins/Android/AndroidManifest.xml b/unity/Assets/Plugins/Android/AndroidManifest.xml index 89f3b76..87d1616 100644 --- a/unity/Assets/Plugins/Android/AndroidManifest.xml +++ b/unity/Assets/Plugins/Android/AndroidManifest.xml @@ -1,8 +1,7 @@ + xmlns:tools="http://schemas.android.com/tools"> - - + - - - - - - - - - - - - \ No newline at end of file + + diff --git a/unity/Assets/Plugins/Android/baseProjectTemplate.gradle b/unity/Assets/Plugins/Android/baseProjectTemplate.gradle index 51cd761..fd43460 100644 --- a/unity/Assets/Plugins/Android/baseProjectTemplate.gradle +++ b/unity/Assets/Plugins/Android/baseProjectTemplate.gradle @@ -3,8 +3,8 @@ plugins { // See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html // See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle // To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version - id 'com.android.application' version '7.3.1' apply false - id 'com.android.library' version '7.3.1' apply false + id 'com.android.application' version '7.4.2' apply false + id 'com.android.library' version '7.4.2' apply false **BUILD_SCRIPT_DEPS** } diff --git a/unity/Assets/Plugins/Android/launcherTemplate.gradle b/unity/Assets/Plugins/Android/launcherTemplate.gradle index 69d2e9a..3b9b3de 100644 --- a/unity/Assets/Plugins/Android/launcherTemplate.gradle +++ b/unity/Assets/Plugins/Android/launcherTemplate.gradle @@ -5,10 +5,11 @@ dependencies { } android { + ndkVersion "**NDKVERSION**" ndkPath "**NDKPATH**" namespace "**NAMESPACE**" - compileSdkVersion **APIVERSION** + compileSdk **APIVERSION** buildToolsVersion '**BUILDTOOLS**' compileOptions { @@ -17,21 +18,19 @@ android { } defaultConfig { - minSdkVersion 24 - targetSdkVersion **TARGETSDKVERSION** + minSdk 24 + targetSdk **TARGETSDK** applicationId '**APPLICATIONID**' ndk { + debugSymbolLevel **DEBUGSYMBOLLEVEL** abiFilters **ABIFILTERS** } - versionCode **VERSIONCODE** - versionName '**VERSIONNAME**' } - aaptOptions { + androidResources { noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ') ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~" - }**SIGN** - + } lintOptions { abortOnError false } @@ -39,15 +38,15 @@ android { buildTypes { debug { minifyEnabled **MINIFY_DEBUG** - proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG** + proguardFiles getDefaultProguardFile('proguard-android.txt') jniDebuggable true } release { minifyEnabled **MINIFY_RELEASE** - proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG** + proguardFiles getDefaultProguardFile('proguard-android.txt') } } - packagingOptions { + packagingOptions { exclude 'META-INF/kotlinx_coroutines_core.version' exclude 'META-INF/androidx.lifecycle_lifecycle-livedata-core.version' exclude 'kotlin/internal/internal.kotlin_builtins' @@ -60,7 +59,7 @@ android { exclude 'kotlin/**/*.kotlin_builtins' exclude 'kotlin/*.kotlin_builtins' } - **PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS** + **PACKAGING****PLAY_ASSET_PACKS****SPLITS** **BUILT_APK_LOCATION** bundle { language { @@ -77,5 +76,5 @@ android { } } - **GOOGLE_PLAY_DEPENDENCIES** + **GOOGLE_PLAY_DEPENDENCIES** }**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP** diff --git a/unity/Assets/Plugins/Android/mainTemplate.gradle b/unity/Assets/Plugins/Android/mainTemplate.gradle index 63b050e..49f5d5d 100644 --- a/unity/Assets/Plugins/Android/mainTemplate.gradle +++ b/unity/Assets/Plugins/Android/mainTemplate.gradle @@ -3,8 +3,8 @@ apply plugin: 'com.android.library' dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.5.1' - **DEPS** -} + implementation(name: 'EmotivCortexLib', ext:'aar') +**DEPS**} buildscript { repositories { @@ -13,11 +13,17 @@ buildscript { } } +repositories { + google() + mavenCentral() +} + android { + ndkVersion "**NDKVERSION**" ndkPath "**NDKPATH**" namespace "com.unity3d.player" - compileSdkVersion **APIVERSION** + compileSdk **APIVERSION** buildToolsVersion '**BUILDTOOLS**' compileOptions { @@ -26,36 +32,37 @@ android { } defaultConfig { - minSdkVersion 24 - targetSdkVersion **TARGETSDKVERSION** + minSdk 24 + targetSdk **TARGETSDK** ndk { + debugSymbolLevel **DEBUGSYMBOLLEVEL** abiFilters **ABIFILTERS** } versionCode **VERSIONCODE** versionName '**VERSIONNAME**' - String client_id = "your_client_id_here" // Replace with your actual client_id - if (client_id.isEmpty()) { - System.err << "You need to config value for client_id" - } else { - String value = client_id.md5() - manifestPlaceholders = [ - 'customScheme': 'emotiv-' + value - ] - } - - consumerProguardFiles 'proguard-unity.txt' **USER_PROGUARD** - **DEFAULT_CONFIG_SETUP** + String client_id = "put_your_application_client_id_for_here" + if (client_id.isEmpty()) { + System.err << "You need to config value for client_id" + } + else { + String value = client_id.md5() + manifestPlaceholders = [ + 'customScheme': 'emotiv-' + value, + "appAuthRedirectScheme": "" + ] + } + consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD** +**DEFAULT_CONFIG_SETUP** } lintOptions { abortOnError false } - aaptOptions { - noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ') // Unity will replace this placeholder with no-compress settings. + androidResources { + noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ') ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~" } - packagingOptions { exclude 'META-INF/kotlinx_coroutines_core.version' exclude 'META-INF/androidx.lifecycle_lifecycle-livedata-core.version' @@ -68,9 +75,9 @@ android { exclude 'kotlin/collections/*.kotlin_builtins' exclude 'kotlin/**/*.kotlin_builtins' exclude 'kotlin/*.kotlin_builtins' - **PACKAGING_OPTIONS** } - **IL_CPP_BUILD_SETUP** - **SOURCE_BUILD_SETUP** - **EXTERNAL_SOURCES** + **PACKAGING** } +**IL_CPP_BUILD_SETUP** +**SOURCE_BUILD_SETUP** +**EXTERNAL_SOURCES** diff --git a/unity/Assets/Plugins/Emotiv-Unity-Plugin b/unity/Assets/Plugins/Emotiv-Unity-Plugin index 5dd8321..5fe94eb 160000 --- a/unity/Assets/Plugins/Emotiv-Unity-Plugin +++ b/unity/Assets/Plugins/Emotiv-Unity-Plugin @@ -1 +1 @@ -Subproject commit 5dd8321eb86e253935249b68e91aa27d464ce494 +Subproject commit 5fe94eb5ebae11920df1837f8c5de668f733337d diff --git a/unity/Packages/manifest.json b/unity/Packages/manifest.json index e9c998f..afbd3ee 100644 --- a/unity/Packages/manifest.json +++ b/unity/Packages/manifest.json @@ -4,17 +4,14 @@ "com.unity.2d.sprite": "1.0.0", "com.unity.2d.tilemap": "1.0.0", "com.unity.ads": "4.4.2", - "com.unity.ai.navigation": "2.0.0", "com.unity.analytics": "3.8.1", - "com.unity.ide.rider": "3.0.28", - "com.unity.ide.visualstudio": "2.0.22", + "com.unity.ide.rider": "3.0.36", + "com.unity.ide.visualstudio": "2.0.23", "com.unity.ide.vscode": "1.2.5", "com.unity.mobile.android-logcat": "1.4.2", - "com.unity.test-framework": "1.3.9", "com.unity.timeline": "1.8.6", "com.unity.ugui": "2.0.0", - "com.unity.xr.legacyinputhelpers": "2.1.10", - "com.unity.modules.accessibility": "1.0.0", + "com.unity.xr.legacyinputhelpers": "2.1.12", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0",