File tree 2 files changed +21
-13
lines changed
2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 43
43
ndk.dir="xxxxxxxx"
44
44
CLIENT_ID = "xxxxxx"
45
45
CLIENT_SECRET = "xxxxxx"
46
- > ### 最后记得配置 [ ` CMake ` 环境] ( https://blog.csdn.net/laibowon/article/details/79939962 ) 。
46
+ > ### 如果需要测试 ` CMake ` ,要打开 Gradle 中的 ` needCMakeTest ` ,记得配置 [ ` CMake ` 环境] ( https://blog.csdn.net/laibowon/article/details/79939962 ) 。
47
47
48
48
49
49
[ 注册 Github APP 传送门] ( https://github.com/settings/applications/new ) ,当然,前提是你现有一个github账号(~ ̄▽ ̄)~ 。
Original file line number Diff line number Diff line change @@ -8,14 +8,18 @@ apply plugin: 'kotlin-kapt'
8
8
9
9
apply plugin : ' realm-android'
10
10
11
+
12
+ // /是否需要测试 CMake
13
+ def needCMakeTest = false
14
+
11
15
android {
12
16
compileSdkVersion 28
13
17
defaultConfig {
14
18
applicationId " com.shuyu.github.kotlin"
15
19
minSdkVersion 21
16
20
targetSdkVersion 28
17
- versionCode 8
18
- versionName " 1.0.8 "
21
+ versionCode 10
22
+ versionName " 1.1.0 "
19
23
javaCompileOptions {
20
24
annotationProcessorOptions {
21
25
includeCompileClasspath = true
@@ -28,13 +32,15 @@ android {
28
32
buildConfigField " String" , " CLIENT_ID" , properties. getProperty(" CLIENT_ID" )
29
33
buildConfigField " String" , " CLIENT_SECRET" , properties. getProperty(" CLIENT_SECRET" )
30
34
31
- // CMake
32
- externalNativeBuild {
33
- cmake {
34
- cppFlags " "
35
- }
36
- ndk {
37
- abiFilters ' armeabi-v7a'
35
+ if (needCMakeTest) {
36
+ // CMake
37
+ externalNativeBuild {
38
+ cmake {
39
+ cppFlags " "
40
+ }
41
+ ndk {
42
+ abiFilters ' armeabi-v7a'
43
+ }
38
44
}
39
45
}
40
46
@@ -43,9 +49,11 @@ android {
43
49
}
44
50
}
45
51
46
- externalNativeBuild {
47
- cmake {
48
- path ' CMakeLists.txt'
52
+ if (needCMakeTest) {
53
+ externalNativeBuild {
54
+ cmake {
55
+ path ' CMakeLists.txt'
56
+ }
49
57
}
50
58
}
51
59
You can’t perform that action at this time.
0 commit comments