From 05c3e8a82512cdb636f3d781d013d4737b20e0e3 Mon Sep 17 00:00:00 2001 From: vimfung Date: Sat, 20 Apr 2019 22:18:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DUnity3D=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../luascriptcore-unity-android/build.gradle | 29 ++++--- .../luascriptcore-unity-android.iml | 79 ++++++++----------- .../src/main/jni/Android.mk | 4 + Source/lua-common/LuaCoroutine.cpp | 2 +- 4 files changed, 54 insertions(+), 60 deletions(-) diff --git a/Source/Unity3D/Android/luascriptcore-unity-android/build.gradle b/Source/Unity3D/Android/luascriptcore-unity-android/build.gradle index f596b74e..a385ffea 100644 --- a/Source/Unity3D/Android/luascriptcore-unity-android/build.gradle +++ b/Source/Unity3D/Android/luascriptcore-unity-android/build.gradle @@ -1,20 +1,26 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 24 - buildToolsVersion "26.0.2" + compileSdkVersion 26 + buildToolsVersion "28.0.3" + + publishNonDefault true + + lintOptions { + abortOnError false + } defaultConfig { - minSdkVersion 14 - targetSdkVersion 24 - versionCode 1 - versionName "1.0" + minSdkVersion 16 + targetSdkVersion 26 + versionCode 20400 + versionName "2.4.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" ndk { moduleName "LuaScriptCore-Unity-Android" - stl "gnustl_static" + stl "c++_static" ldLibs "log" abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" //筛选只需要的架构,其中armeabi、mips、mips64已标记过时 } @@ -22,14 +28,13 @@ android { externalNativeBuild { ndkBuild { - arguments "APP_STL=gnustl_static", + arguments "APP_STL=c++_static", "NDK_DEBUG=1", - "APP_PLATFORM=android-14", - "NDK_TOOLCHAIN_VERSION=4.9" + "APP_PLATFORM=android-16", + "NDK_TOOLCHAIN_VERSION=clang" cppFlags "-frtti", "-fexceptions", - "-std=gnu++11", - "-Wno-format-contains-nul", + "-std=c++11", "-g", "-Wno-deprecated-declarations", "-fpermissive" diff --git a/Source/Unity3D/Android/luascriptcore-unity-android/luascriptcore-unity-android.iml b/Source/Unity3D/Android/luascriptcore-unity-android/luascriptcore-unity-android.iml index 80f10726..ccb9fb78 100644 --- a/Source/Unity3D/Android/luascriptcore-unity-android/luascriptcore-unity-android.iml +++ b/Source/Unity3D/Android/luascriptcore-unity-android/luascriptcore-unity-android.iml @@ -8,16 +8,16 @@ - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -124,7 +109,7 @@ - + diff --git a/Source/Unity3D/Android/luascriptcore-unity-android/src/main/jni/Android.mk b/Source/Unity3D/Android/luascriptcore-unity-android/src/main/jni/Android.mk index 970fd0e1..f7708dd2 100644 --- a/Source/Unity3D/Android/luascriptcore-unity-android/src/main/jni/Android.mk +++ b/Source/Unity3D/Android/luascriptcore-unity-android/src/main/jni/Android.mk @@ -72,6 +72,10 @@ LOCAL_SRC_FILES := \ ../../../../../../lua-common/LuaExportPropertyDescriptor.cpp \ ../../../../../../lua-common/LuaTmpValue.cpp \ ../../../../../../lua-common/LuaOperationQueue.cpp \ + ../../../../../../lua-common/LuaCoroutine.cpp \ + ../../../../../../lua-common/LuaError.cpp \ + ../../../../../../lua-common/LuaScriptController.cpp \ + ../../../../../../lua-common/LuaTable.cpp \ LOCAL_C_INCLUDES += $(LOCAL_PATH) LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../../../../lua-core/src diff --git a/Source/lua-common/LuaCoroutine.cpp b/Source/lua-common/LuaCoroutine.cpp index 264c6424..98797d6d 100644 --- a/Source/lua-common/LuaCoroutine.cpp +++ b/Source/lua-common/LuaCoroutine.cpp @@ -98,7 +98,7 @@ static const char * CatchLuaExceptionHandlerName = "__catchExcepitonHandler"; /** * 线程处理器 - * @param context 上下文对象 + * @param coroutine 协程对象 * @param handler 线程处理器 * @param arguments 参数列表 * @param scriptController 脚本控制器