-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
98 lines (84 loc) · 2.65 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
89
90
91
92
93
94
95
96
97
98
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
maven {
url 'https://maven.google.com'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'de.undercouch:gradle-download-task:3.4.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
maven { url "https://maven.google.com" }
mavenLocal()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle.afterProject { project ->
if (project.pluginManager.hasPlugin('com.android.application')
|| project.pluginManager.hasPlugin('com.android.library')
|| project.pluginManager.hasPlugin('com.android.test')
|| project.pluginManager.hasPlugin('com.android.feature') ) {
if (true) {
gradle.println("Override build ABIs for the project ${project.name}")
project.android {
splits {
abi {
enable true
universalApk false
//reset()
//include 'armeabi-v7a'
//include 'arm64-v8a'
//include 'x86'
//include 'x86_64'
}
}
}
}
if (true) {
gradle.println("Override lintOptions for the project ${project.name}")
project.android {
lintOptions {
// checkReleaseBuilds false
abortOnError false
}
}
}
// (you still need to re-build OpenCV with debug information to debug it)
if (true) {
gradle.println("Override doNotStrip-debug for the project ${project.name}")
project.android {
buildTypes {
debug {
packagingOptions {
doNotStrip '**/*.so' // controlled by OpenCV CMake scripts
}
}
}
}
}
if (false || project.hasProperty("doNotStrip")) {
gradle.println("Override doNotStrip-release for the project ${project.name}")
project.android {
buildTypes {
release {
packagingOptions {
doNotStrip '**/*.so' // controlled by OpenCV CMake scripts
}
}
}
}
}
}
}