Skip to content

Modify Android NDK compiler from GCC (deprecated) to Clang (recommended) #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/Android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

Expand All @@ -18,8 +18,8 @@ buildscript {
allprojects {

repositories {
jcenter()
google()
jcenter()
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/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-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
2 changes: 1 addition & 1 deletion Source/Android/luascriptcore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apply from: './compile.gradle'
//apply from: './compile-5.1.5.gradle' //lua 5.1.5 版本

android {
buildToolsVersion '27.0.3'
buildToolsVersion '28.0.3'
}
21 changes: 10 additions & 11 deletions Source/Android/luascriptcore/compile.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 24
buildToolsVersion '27.0.3'
compileSdkVersion 26
buildToolsVersion '28.0.3'
publishNonDefault true

lintOptions {
abortOnError false
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 24
minSdkVersion 16
targetSdkVersion 26
versionCode 20200
versionName "2.3.1"

ndk {
moduleName "LuaScriptCore"
stl "gnustl_static"
stl "c++_static"
ldLibs "log"
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" //筛选只需要的架构,其中armeabi、mips、mips64已标记过时
}
Expand All @@ -26,15 +26,14 @@ android {

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"
Expand Down Expand Up @@ -118,4 +117,4 @@ dependencies {
}

apply from: './installv1.gradle'
apply from: './bintrayv1.gradle'
apply from: './bintrayv1.gradle'