adjust android / linux build config for cocos CLI (#18780)

* make android native build default mode clear

* update android native build comment

* temp change sub-module, need change before merge

* change tests project cmake file dir

* change PROP_BUILD_TYPE to PROP_BUILD_TYPE

* change var name for build.gradle

* modify others 3 tests project config

* make compile_sdk_version same as target_sdk_version

* update sdk version in CI config script

* update sub-module to cocos2d

* let the cmake build of template  project more clear

* update cocos-console submodule
This commit is contained in:
leda 2018-04-24 13:46:20 +08:00 committed by minggo
parent 2991a18fae
commit 9275dda539
35 changed files with 143 additions and 168 deletions

View File

@ -57,10 +57,11 @@ The default build is for iOS device, if you want to run on simulator, please add
We use the Gradle to Android applacition, and Gradle use cmake to build the native code, see the [property](https://github.com/cocos2d/cocos2d-x/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/gradle.properties#L38): `PROP_NDK_MODE`, it control the way of native build
```sh
# android cmake support
# uncomment it, native code will build by cmake
# keep comment, native code will build by ndkBuild
#PROP_NDK_MODE=cmake
# android native code build type
# none, native code will never be compiled.
# cmake, native code will be compiled by CMakeLists.txt
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
```
If you want to add cmake build arguments, please add it at [externalNativeBuild](https://github.com/cocos2d/cocos2d-x/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/app/build.gradle#L25) block of [app/build.gradle] file.

View File

@ -29,15 +29,14 @@ set(APP_NAME TemplateCpp)
project (${APP_NAME})
if(NOT DEFINED BUILD_ENGINE_DONE)
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cocos2d)
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cocos2d)
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
include(CocosBuildSet)
CocosBuildSet()
if(NOT USE_COCOS_PREBUILT)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
endif()
include(CocosBuildSet)
CocosBuildSet()
if(NOT USE_COCOS_PREBUILT)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
endif()
# record sources, headers, resources...

View File

@ -14,15 +14,14 @@ android {
versionName "1.0"
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
targets 'MyGame'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
targets 'MyGame'
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \
@ -51,13 +50,12 @@ android {
}
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
path "jni/Android.mk"
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -35,10 +35,11 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi-v7a
# android cmake support
# uncomment it, native code will build by cmake
# keep comment, native code will build by ndkBuild
#PROP_NDK_MODE=cmake
# android native code build type
# none, native code will never be compiled.
# cmake, native code will be compiled by CMakeLists.txt
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -31,17 +31,15 @@ set(APP_NAME TemplateJS)
project(${APP_NAME})
set(RUNTIME_SRC_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/runtime-src)
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/cocos2d-x)
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
if(NOT DEFINED BUILD_ENGINE_DONE)
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/cocos2d-x)
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
include(CocosBuildSet)
CocosBuildSet()
include(CocosBuildSet)
CocosBuildSet()
if(NOT USE_COCOS_PREBUILT)
set(BUILD_JS_LIBS ON)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
endif(NOT USE_COCOS_PREBUILT)
if(NOT USE_COCOS_PREBUILT)
set(BUILD_JS_LIBS ON)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
endif()
# script and source files info, not need to compile

View File

@ -14,15 +14,14 @@ android {
versionName "1.0"
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
targets 'cocos2djs'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \
"-DUSE_CHIPMUNK=TRUE", "-DUSE_BULLET=TRUE", "-DBUILD_JS_LIBS=TRUE"
@ -49,13 +48,12 @@ android {
}
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
path "jni/Android.mk"
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../../../CMakeLists.txt"
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -35,10 +35,11 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi-v7a
# android cmake support
# uncomment it, native code will build by cmake
# keep comment, native code will build by ndkBuild
#PROP_NDK_MODE=cmake
# android native code build type
# none, native code will never be compiled.
# cmake, native code will be compiled by CMakeLists.txt
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -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-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

View File

@ -28,18 +28,16 @@ set(APP_NAME TemplateLua)
project(${APP_NAME})
set(RUNTIME_SRC_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/runtime-src)
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/cocos2d-x)
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
if(NOT DEFINED BUILD_ENGINE_DONE)
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/cocos2d-x)
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
include(CocosBuildSet)
CocosBuildSet()
include(CocosBuildSet)
CocosBuildSet()
if(NOT USE_COCOS_PREBUILT)
set(BUILD_LUA_LIBS ON)
set(BUILD_SIMU_LIB ON)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
endif()
if(NOT USE_COCOS_PREBUILT)
set(BUILD_LUA_LIBS ON)
set(BUILD_SIMU_LIB ON)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
endif()
# script and source files info, not need to compile

View File

@ -14,15 +14,14 @@ android {
versionName "1.0"
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
targets 'cocos2dlua'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \
"-DUSE_CHIPMUNK=TRUE", "-DUSE_BULLET=TRUE", "-DBUILD_LUA_LIBS=TRUE"
@ -50,13 +49,12 @@ android {
}
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
path "jni/Android.mk"
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../../../CMakeLists.txt"
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -35,10 +35,11 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi-v7a
# android cmake support
# uncomment it, native code will build by cmake
# keep comment, native code will build by ndkBuild
#PROP_NDK_MODE=cmake
# android native code build type
# none, native code will never be compiled.
# cmake, native code will be compiled by CMakeLists.txt
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -39,13 +39,3 @@ add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/js-tests/project ${ENGINE_BINARY_PA
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-empty-test/project ${ENGINE_BINARY_PATH}/tests/lua-empty-test)
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-tests/project ${ENGINE_BINARY_PATH}/tests/lua-test)
# # temp feature: add engine all template project, as the test project, it make template project test easier
# add_subdirectory(${COCOS2DX_ROOT_PATH}/templates/cpp-template-default ${ENGINE_BINARY_PATH}/template/cpp-template-default)
# add_subdirectory(${COCOS2DX_ROOT_PATH}/templates/js-template-default ${ENGINE_BINARY_PATH}/template/js-template-default)
# # TODO: run on Windows exist defect, need to check later
# add_subdirectory(${COCOS2DX_ROOT_PATH}/templates/lua-template-default ${ENGINE_BINARY_PATH}/template/lua-template-default)

View File

@ -8,10 +8,7 @@
},
"linux_cfg": {
"project_path": "proj.linux",
"project_name": "cpp-empty-test",
"cmake_path": "../../",
"build_dir": "../../build/linux-build",
"build_result_dir": "cpp-empty-test"
"project_name": "cpp-empty-test"
},
"ios_cfg": {
"project_path": "../../build",

View File

@ -14,15 +14,14 @@ android {
versionName "1.0"
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
targets 'cpp_empty_test'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
targets "cpp_empty_test"
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang",
@ -51,13 +50,12 @@ android {
}
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
path "jni/Android.mk"
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -35,10 +35,11 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi-v7a
# android cmake support
# uncomment it, native code will build by cmake
# keep comment, native code will build by ndkBuild
#PROP_NDK_MODE=cmake
# android native code build type
# none, native code will never be compiled.
# cmake, native code will be compiled by CMakeLists.txt
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -8,10 +8,7 @@
},
"linux_cfg": {
"project_path": "proj.linux",
"project_name": "cpp-tests",
"cmake_path": "../../",
"build_dir": "../../build/linux-build",
"build_result_dir": "cpp-tests"
"project_name": "cpp-tests"
},
"ios_cfg": {
"project_path": "../../build",

View File

@ -14,15 +14,14 @@ android {
versionName "1.0"
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
targets 'cpp_tests'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
targets 'cpp_tests'
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \
@ -50,13 +49,12 @@ android {
}
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
path "jni/Android.mk"
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -35,10 +35,11 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi-v7a
# android cmake support
# uncomment it, native code will build by cmake
# keep comment, native code will build by ndkBuild
#PROP_NDK_MODE=cmake
# android native code build type
# none, native code will never be compiled.
# cmake, native code will be compiled by CMakeLists.txt
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -15,8 +15,7 @@ android {
externalNativeBuild {
ndkBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
// skip the NDK Build step if PROP_NDK_MODE is none
if (PROP_BUILD_TYPE == 'ndk-build') {
targets 'game_controller_test'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
@ -34,8 +33,7 @@ android {
externalNativeBuild {
ndkBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
// skip the NDK Build step if PROP_NDK_MODE is none
if (PROP_BUILD_TYPE == 'ndk-build') {
path "jni/Android.mk"
}
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -33,7 +33,12 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Available architextures (armeabi | armeabi-v7a | arm64-v8a | x86)
# To build for multiple architexture, use the `:` between them
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi
PROP_APP_ABI=armeabi-v7a
# android native code build type
# none, native code will never be compiled.
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -40,9 +40,7 @@
"linux_cfg": {
"project_path": "project/proj.linux",
"project_name": "js-tests",
"cmake_path": "../../",
"build_dir": "../../build/linux-build",
"build_result_dir": "js-tests"
"cmake_path": "project"
},
"wp8_1_cfg" : {
"project_path": "../../build",

View File

@ -12,15 +12,14 @@ android {
versionName "1.0"
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
targets 'js_tests'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
targets "js_tests"
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \
@ -48,13 +47,12 @@ android {
}
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
path "jni/Android.mk"
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -35,10 +35,11 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi-v7a
# android cmake support
# uncomment it, native code will build by cmake
# keep comment, native code will build by ndkBuild
#PROP_NDK_MODE=cmake
# android native code build type
# none, native code will never be compiled.
# cmake, native code will be compiled by CMakeLists.txt
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -9,9 +9,7 @@
"linux_cfg": {
"project_path": "project/proj.linux",
"project_name": "lua-empty-test",
"cmake_path": "../../",
"build_dir": "../../build/linux-build",
"build_result_dir": "lua-empty-test"
"cmake_path": "project"
},
"ios_cfg": {
"project_path": "../../build",

View File

@ -14,15 +14,14 @@ android {
versionName "1.0"
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
targets 'lua_empty_test'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
targets "lua_empty_test"
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \
@ -50,13 +49,12 @@ android {
}
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
path "jni/Android.mk"
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -35,10 +35,11 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi-v7a
# android cmake support
# uncomment it, native code will build by cmake
# keep comment, native code will build by ndkBuild
#PROP_NDK_MODE=cmake
# android native code build type
# none, native code will never be compiled.
# cmake, native code will be compiled by CMakeLists.txt
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -15,8 +15,7 @@ android {
externalNativeBuild {
ndkBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
// skip the NDK Build step if PROP_NDK_MODE is none
if (PROP_BUILD_TYPE == 'ndk-build') {
targets 'lua_game_controller'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
@ -34,8 +33,7 @@ android {
externalNativeBuild {
ndkBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
// skip the NDK Build step if PROP_NDK_MODE is none
if (PROP_BUILD_TYPE == 'ndk-build') {
path "jni/Android.mk"
}
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -33,7 +33,12 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Available architextures (armeabi | armeabi-v7a | arm64-v8a | x86)
# To build for multiple architexture, use the `:` between them
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi
PROP_APP_ABI=armeabi-v7a
# android native code build type
# none, native code will never be compiled.
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -9,9 +9,7 @@
"linux_cfg": {
"project_path": "project/proj.linux",
"project_name": "lua-tests",
"cmake_path": "../../",
"build_dir": "../../build/linux-build",
"build_result_dir": "lua-tests"
"cmake_path": "project"
},
"ios_cfg": {
"project_path": "../../build",

View File

@ -14,15 +14,14 @@ android {
versionName "1.0"
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
targets 'lua_tests'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
targets 'lua_tests'
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \
@ -50,13 +49,12 @@ android {
}
externalNativeBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE == 'ndk') {
if (PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
// skip the NDK Build step if PROP_NDK_MODE is none
path "jni/Android.mk"
}
}
else if (PROP_NDK_MODE == 'cmake') {
else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -35,10 +35,11 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi-v7a
# android cmake support
# uncomment it, native code will build by cmake
# keep comment, native code will build by ndkBuild
#PROP_NDK_MODE=cmake
# android native code build type
# none, native code will never be compiled.
# cmake, native code will be compiled by CMakeLists.txt
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -15,8 +15,7 @@ android {
externalNativeBuild {
ndkBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
// skip the NDK Build step if PROP_NDK_MODE is none
if (PROP_BUILD_TYPE == 'ndk-build') {
targets 'cocos2dcpp'
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments '-j' + Runtime.runtime.availableProcessors()
@ -35,8 +34,7 @@ android {
externalNativeBuild {
ndkBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
// skip the NDK Build step if PROP_NDK_MODE is none
if (PROP_BUILD_TYPE == 'ndk-build') {
path "jni/Android.mk"
}
}

View File

@ -18,7 +18,7 @@
# org.gradle.parallel=true
# Android SDK version that will be used as the compile project
PROP_COMPILE_SDK_VERSION=25
PROP_COMPILE_SDK_VERSION=27
# Android SDK version that will be used as the earliest version of android this application can run on
PROP_MIN_SDK_VERSION=14
@ -33,7 +33,12 @@ PROP_BUILD_TOOLS_VERSION=27.0.1
# Available architextures (armeabi | armeabi-v7a | arm64-v8a | x86)
# To build for multiple architexture, use the `:` between them
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi
PROP_APP_ABI=armeabi-v7a
# android native code build type
# none, native code will never be compiled.
# ndk-build, native code will be compiled by Android.mk
PROP_BUILD_TYPE=ndk-build
# uncomment it and fill in sign information for release mode
#RELEASE_STORE_FILE=file path of keystore

View File

@ -82,8 +82,8 @@ def install_android_sdk():
switches = " --verbose --sdk_root=" + ANDROID_SDK + " "
cmd1 = SDK_MANAGER + switches
packages = [
"platforms;android-15",
"build-tools;25.0.0",
"platforms;android-27",
"build-tools;27.0.1",
"platform-tools",
"tools"
]

@ -1 +1 @@
Subproject commit 03d1f8d291ed63439918fa4b180c7b9d698a2bfd
Subproject commit 1b69aa81a05d727cd15d5d41c94c0e7332bb622e