-
Notifications
You must be signed in to change notification settings - Fork 282
/
Copy pathbuild.gradle
104 lines (92 loc) · 3.09 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
99
100
101
102
103
104
plugins {
alias(libs.plugins.android.library)
}
description = 'Conscrypt: Android Platform'
ext {
androidHome = "$System.env.ANDROID_HOME"
androidSdkInstalled = file("$androidHome").exists()
androidVersionCode = 1
androidVersionName = "$version"
// Platform is always built against head, so we can use newer API versions.
androidMinSdkVersion = 26
androidTargetSdkVersion = 26
}
android {
namespace "org.conscrypt"
compileSdkVersion androidTargetSdkVersion
compileOptions {
sourceCompatibility androidMinJavaVersion;
targetCompatibility androidMinJavaVersion
}
defaultConfig {
minSdkVersion androidMinSdkVersion
targetSdkVersion androidTargetSdkVersion
versionCode androidVersionCode
versionName androidVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'proguard-rules.pro'
externalNativeBuild {
cmake {
arguments '-DANDROID=True',
'-DANDROID_STL=c++_static',
"-DBORINGSSL_HOME=$boringsslHome"
cFlags '-fvisibility=hidden',
'-DBORINGSSL_SHARED_LIBRARY',
'-DBORINGSSL_IMPLEMENTATION',
'-DOPENSSL_SMALL',
'-D_XOPEN_SOURCE=700',
'-Wno-unused-parameter'
}
}
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
java {
srcDirs = [
"${rootDir}/common/src/main/java",
"src/main/java",
]
excludes = [ 'org/conscrypt/Platform.java' ]
}
}
}
lintOptions {
lintConfig file('lint.xml')
}
}
configurations {
publicApiDocs
}
dependencies {
implementation project(path: ':conscrypt-openjdk', configuration: 'platform')
publicApiDocs project(':conscrypt-api-doclet')
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
exclude module: 'support-annotations'
exclude module: 'support-v4'
exclude module: 'support-v13'
exclude module: 'recyclerview-v7'
exclude module: 'appcompat-v7'
exclude module: 'design'
})
testCompileOnly project(':conscrypt-android-stub'),
project(':conscrypt-libcore-stub')
testImplementation project(path: ":conscrypt-testing", configuration: "shadow"),
libs.junit
compileOnly project(':conscrypt-android-stub'),
project(':conscrypt-libcore-stub')
// Adds the constants module as a dependency so that we can include its generated source
compileOnly project(':conscrypt-constants')
}
// Disable running the tests.
tasks.withType(Test).configureEach {
enabled = false
}