Skip to content

Commit eaec03b

Browse files
authored
Merge pull request #18 from zhaoxuan/master
Modify Android NDK compiler from GCC (deprecated) to Clang (recommended)
2 parents 8493c9d + 6825b56 commit eaec03b

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

Source/Android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
jcenter()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.1.4'
9+
classpath 'com.android.tools.build:gradle:3.2.1'
1010
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
1111
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1212

@@ -18,8 +18,8 @@ buildscript {
1818
allprojects {
1919

2020
repositories {
21-
jcenter()
2221
google()
22+
jcenter()
2323
}
2424
}
2525

Source/Android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip

Source/Android/luascriptcore/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apply from: './compile.gradle'
22
//apply from: './compile-5.1.5.gradle' //lua 5.1.5 版本
33

44
android {
5-
buildToolsVersion '27.0.3'
5+
buildToolsVersion '28.0.3'
66
}

Source/Android/luascriptcore/compile.gradle

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 24
5-
buildToolsVersion '27.0.3'
4+
compileSdkVersion 26
5+
buildToolsVersion '28.0.3'
66
publishNonDefault true
77

88
lintOptions {
99
abortOnError false
1010
}
1111

1212
defaultConfig {
13-
minSdkVersion 14
14-
targetSdkVersion 24
13+
minSdkVersion 16
14+
targetSdkVersion 26
1515
versionCode 20200
1616
versionName "2.3.1"
1717

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

2727
ndkBuild {
2828

29-
arguments "APP_STL=gnustl_static",
29+
arguments "APP_STL=c++_static",
3030
"NDK_DEBUG=1",
31-
"APP_PLATFORM=android-14",
32-
"NDK_TOOLCHAIN_VERSION=4.9"
31+
"APP_PLATFORM=android-16",
32+
"NDK_TOOLCHAIN_VERSION=clang"
3333

3434
cppFlags "-frtti",
3535
"-fexceptions",
36-
"-std=gnu++11",
37-
"-Wno-format-contains-nul",
36+
"-std=c++11",
3837
"-g",
3938
"-Wno-deprecated-declarations",
4039
"-fpermissive"
@@ -118,4 +117,4 @@ dependencies {
118117
}
119118

120119
apply from: './installv1.gradle'
121-
apply from: './bintrayv1.gradle'
120+
apply from: './bintrayv1.gradle'

0 commit comments

Comments
 (0)