-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
132 lines (114 loc) · 5.2 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
apply plugin: 'com.android.library'
apply from: 'upload.gradle'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
//noinspection MinSdkTooLow
minSdkVersion 11
targetSdkVersion 28
versionCode project.subVersionCode
versionName "${project.subVersionName}a"
externalNativeBuild {
// 注意使用hidden后jni外部接口需要使用JNIEXPORT或者__attribute__ ((visibility ("default")))
cmake {
cppFlags "-fvisibility=hidden", "-Wall"
arguments "-GNinja"
}
}
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
consumerProguardFiles 'consumer-proguard-rules.pro'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
minifyEnabled false
buildConfigField("String", "VERSION_NAME", "\"${project.subVersionName}a\"")
buildConfigField("String", "BUGLY_ID", BUGLY_ID)
}
release {
minifyEnabled true
buildConfigField("String", "VERSION_NAME", "\"${project.subVersionName}a\"")
buildConfigField("String", "BUGLY_ID", BUGLY_ID)
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "version"
productFlavors {
normal {
buildConfigField "String", "HTTP_INIT_SERVER", HTTP_INIT_SERVER
buildConfigField "String", "HTTPS_INIT_SERVER", HTTPS_INIT_SERVER
buildConfigField "String", "HTTP_TOLERANCE_SERVER", HTTP_TOLERANCE_SERVER
buildConfigField "String", "HTTPS_TOLERANCE_SERVER", HTTPS_TOLERANCE_SERVER
buildConfigField "String", "ATTA_ID", ATTA_ID
buildConfigField "String", "ATTA_TOKEN", ATTA_TOKEN
buildConfigField "String[]", "DOMAIN_SERVICE_DOMAINS", DOMAIN_SERVICE_DOMAINS
buildConfigField "String", "DOMAIN_SERVICE_ID", DOMAIN_SERVICE_ID
buildConfigField "String", "DOMSIN_SERVICE_KEY", DOMSIN_SERVICE_KEY
buildConfigField "String", "DOMAIN_SERVICE_TOKEN", DOMAIN_SERVICE_TOKEN
}
intl {
buildConfigField "String", "HTTP_INIT_SERVER", INTL_HTTP_INIT_SERVER
buildConfigField "String", "HTTPS_INIT_SERVER", "\"\""
buildConfigField "String", "HTTP_TOLERANCE_SERVER", INTL_HTTP_TOLERANCE_SERVER
buildConfigField "String", "HTTPS_TOLERANCE_SERVER", "\"\""
buildConfigField "String", "ATTA_ID", INTL_ATTA_ID
buildConfigField "String", "ATTA_TOKEN", INTL_ATTA_TOKEN
buildConfigField "String[]", "DOMAIN_SERVICE_DOMAINS", INTL_DOMAIN_SERVICE_DOMAINS
buildConfigField "String", "DOMAIN_SERVICE_ID", INTL_DOMAIN_SERVICE_ID
buildConfigField "String", "DOMSIN_SERVICE_KEY", INTL_DOMSIN_SERVICE_KEY
buildConfigField "String", "DOMAIN_SERVICE_TOKEN", INTL_DOMAIN_SERVICE_TOKEN
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
libraryVariants.all { variant ->
def flavor = variant.getFlavorName()
def newLibName = flavor == "normal" ?
"HTTPDNS_Android_v${defaultConfig.versionName}_${variant.buildType.name}.aar" :
"HTTPDNS_Android_v${defaultConfig.versionName}_${variant.buildType.name}_${flavor}.aar"
variant.outputs.all {
outputFileName = newLibName
}
}
}
configurations {
doclava
}
dependencies {
implementation 'androidx.annotation:annotation:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
doclava 'com.google.doclava:doclava:1.0.6'
}
task generateJavadoc(type: Javadoc, dependsOn: project.configurations.doclava) {
failOnError = true
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
destinationDir = file("../javadocs/")
options.doclet = "com.google.doclava.Doclava"
options.docletpath = configurations.doclava.files as List
options.encoding = "UTF-8"
options.memberLevel = JavadocMemberLevel.PUBLIC
title = null
source = [
'src/main/java/com/tencent/msdk/dns/DnsConfig.java',
'src/main/java/com/tencent/msdk/dns/DnsService.java',
'src/main/java/com/tencent/msdk/dns/base/executor/DnsExecutors.java',
'src/main/java/com/tencent/msdk/dns/ILookedUpListener.java',
'src/main/java/com/tencent/msdk/dns/base/log/ILogNode.java',
'src/main/java/com/tencent/msdk/dns/core/LookupResult.java',
'src/main/java/com/tencent/msdk/dns/core/IpSet.java',
'src/main/java/com/tencent/msdk/dns/core/stat/StatisticsMerge.java',
'src/main/java/com/tencent/msdk/dns/core/stat/AbsStatistics.java',
'src/main/java/com/tencent/msdk/dns/core/local/LocalDns.java',
'src/main/java/com/tencent/msdk/dns/core/rest/share/AbsRestDns.java',
'src/main/java/com/tencent/msdk/dns/MSDKDnsResolver.java',
]
}