-
Notifications
You must be signed in to change notification settings - Fork 238
/
build.gradle
88 lines (78 loc) · 2.51 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
apply plugin: 'com.android.library'
group = 'com.mapzen.tangram'
version = '0.17.2-SNAPSHOT'
android {
compileSdk 30
ndkVersion "25.2.9519653"
// Specific ABI targets can be chosen with the 'abis' property as a comma-separated list of ABIs.
// From the command line, add '-Ptangram.abis=armeabi-v7a,x86,...' to only build those ABIs.
// When building from Android Studio, the ABI for the target device is injected and takes precedence.
def abi = 'all'
if (!project.hasProperty('android.injected.invoked.from.ide') && project.hasProperty('tangram.abis')) {
abi = project.getProperty('tangram.abis')
}
defaultConfig {
minSdkVersion 16
targetSdkVersion 30
consumerProguardFiles 'tangram-proguard-rules.txt'
buildConfigField 'String', 'TAG', '"Tangram"'
externalNativeBuild {
cmake {
targets 'tangram'
arguments '-DTANGRAM_PLATFORM=android',
'-DANDROID_STL=c++_shared'
cppFlags '-std=c++14',
'-fvisibility=hidden', // export only JNIEXPORT
'-pedantic',
'-fPIC',
'-fexceptions',
'-frtti',
// linker
'-Wl,--exclude-libs,ALL', // dont export static lib symbols
//warnings
'-Wall',
'-Wignored-qualifiers',
'-Wtype-limits',
'-Wno-missing-field-initializers',
'-Wno-format-pedantic',
'-Wno-gnu-statement-expression',
'-Wno-gnu-anonymous-struct',
'-Wno-nested-anon-types',
'-Wno-unused-command-line-argument', // for -Wl linker flags..
'-Wno-unknown-warning-option'
if (project.findProperty('tangram.ccache')) {
arguments += '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache'
arguments += '-DCMAKE_C_COMPILER_LAUNCHER=ccache'
}
if (abi == 'all') {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
} else {
abiFilters abi.split(',')
}
}
}
}
externalNativeBuild {
cmake {
path '../../../CMakeLists.txt'
}
}
buildTypes {
debug {
externalNativeBuild {
cmake.cppFlags '-g'
}
}
release {
externalNativeBuild {
cmake.cppFlags'-g0'
}
}
}
namespace 'com.mapzen.tangram'
}
dependencies {
api 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'androidx.annotation:annotation:1.1.0'
}
apply from: 'publishing.gradle'