-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
60 lines (50 loc) · 1.43 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
buildscript {
repositories {
google()
mavenCentral()
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.quittle:setup-android-sdk:+'
final String androidGradlePluginVersion = System.env.ANDROID_GRADLE_PLUGIN_VERSION ?: '4.1.0'
classpath "com.android.tools.build:gradle:${androidGradlePluginVersion}"
}
}
repositories {
google()
jcenter()
}
apply plugin: 'com.quittle.setup-android-sdk'
apply plugin: 'android'
android {
ndkVersion '23.1.7779620'
compileSdkVersion 29
final String androidBuildToolsVersion = System.env.ANDROID_BUILD_TOOLS_VERSION ?: '28.0.3'
buildToolsVersion androidBuildToolsVersion
externalNativeBuild {
ndkBuild {
path 'src/main/cpp/Android.mk'
}
}
}
setupAndroidSdk {
// Used by the validate_plugin script
final String version = System.env.SDK_TOOLS_VERSION
if (version != null) {
sdkToolsVersion version
sdkToolsVersion = version
}
final String licensesDir = System.env.LICENSES_DIR
if (licensesDir != null) {
licensesDirectory file(licensesDir)
licensesDirectory = file(licensesDir)
}
// All of these should be supported
final String NDK = "ndk;${android.ndkVersion}"
packages(NDK)
packages NDK, NDK
packages([NDK, NDK])
// Final version that is actually used
packages 'cmdline-tools;1.0', 'ndk-bundle', NDK
}