-
Notifications
You must be signed in to change notification settings - Fork 42
/
build.gradle
136 lines (118 loc) · 5.41 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
133
134
135
136
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
rootProject.ext.configPath = "./src/main/assets/app-config.json"
apply from: "../../parse_json.gradle"
android {
compileSdkVersion 30
buildToolsVersion "26.0.3"
defaultConfig {
applicationId "com.tencent.iot.explorer.device.android.app"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName rootProject.ext.sdk.sdkdemoVersion
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled true
externalNativeBuild {
cmake {
cppFlags "-std=c++11 -frtti"
}
}
ndk {
// 设置支持的SO库架构
abiFilters 'armeabi-v7a', 'arm64-v8a'
ndkVersion '22.0.7026061'
}
buildConfigField 'String', 'PRODUCT_ID', "\"${getValueById('PRODUCT_ID')}\""
buildConfigField 'String', 'DEVICE_NAME', "\"${getValueById('DEVICE_NAME')}\""
buildConfigField 'String', 'DEVICE_PSK', "\"${getValueById('DEVICE_PSK')}\""
buildConfigField 'String', 'SUB_PRODUCT_ID', "\"${getValueById('SUB_PRODUCT_ID')}\""
buildConfigField 'String', 'SUB_DEV_NAME', "\"${getValueById('SUB_DEV_NAME')}\""
buildConfigField 'String', 'SUB_DEV_PSK', "\"${getValueById('SUB_DEV_PSK')}\""
buildConfigField 'String', 'SUB_PRODUCT_ID2', "\"${getValueById('SUB_PRODUCT_ID2')}\""
buildConfigField 'String', 'SUB_DEV_NAME2', "\"${getValueById('SUB_DEV_NAME2')}\""
buildConfigField 'String', 'SUB_DEV_PSK2', "\"${getValueById('SUB_DEV_PSK2')}\""
buildConfigField 'String', 'TME_PRODUCT_ID', "\"${getValueById('TME_PRODUCT_ID')}\""
buildConfigField 'String', 'TME_DEVICE_NAME', "\"${getValueById('TME_DEVICE_NAME')}\""
buildConfigField 'String', 'TME_DEVICE_PSK', "\"${getValueById('TME_DEVICE_PSK')}\""
buildConfigField 'String', 'TME_BROKER_URL', "\"${getValueById('TME_BROKER_URL')}\""
buildConfigField 'String', 'CENTRAL_PRODUCT_ID', "\"${getValueById('CENTRAL_PRODUCT_ID')}\""
buildConfigField 'String', 'CENTRAL_DEVICE_NAME', "\"${getValueById('CENTRAL_DEVICE_NAME')}\""
buildConfigField 'String', 'CENTRAL_DEVICE_PSK', "\"${getValueById('CENTRAL_DEVICE_PSK')}\""
buildConfigField 'String', 'CENTRAL_BROKER_URL', "\"${getValueById('CENTRAL_BROKER_URL')}\""
buildConfigField 'String', 'SDKDemoCommitID', "\"${rootProject.ext.sdk.sdkdemoVersion}\""
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
}
}
packagingOptions {
exclude 'org/bouncycastle/x509/CertPathReviewerMessages_de.properties'
exclude 'org/bouncycastle/x509/CertPathReviewerMessages.properties'
}
lintOptions {
abortOnError false
}
applicationVariants.all { variant ->
variant.outputs.all {
def date = new Date().format("yyyyMMddHHmmss", TimeZone.getTimeZone("GMT+08"))
if (variant.buildType.name == 'debug') {
outputFileName = "explorer-device-android-debug-${date}.apk"
}
if (variant.buildType.name == 'release') {
outputFileName = "explorer-device-android-release-${date}.apk"
}
}
}
sourceSets {
main {
java {
exclude 'com/tencent/iot/explorer/device/tme/'
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
implementation project(':explorer:explorer-device-android')
implementation project(':explorer:explorer-device-face')
implementation project(':explorer:explorer-device-rtc')
implementation project(':explorer:explorer-device-central')
implementation project(':explorer:explorer-device-broadcast')
api project(':explorer:explorer-device-video')
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.2.0'
testImplementation 'junit:junit:4.13'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
//依赖一个utils类
implementation 'com.blankj:utilcode:1.25.9'
implementation 'com.google.zxing:core:3.3.0'
if (findProject(':explorer:explorer-device-tme') != null) {
api project(':explorer:explorer-device-tme')
}
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.0'
def room_version = "2.2.5"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-rxjava2:$room_version"
//刷新
api 'com.scwang.smart:refresh-layout-kernel:2.0.0-alpha-1'
api 'com.scwang.smart:refresh-header-classics:2.0.0-alpha-1'
api 'com.scwang.smart:refresh-footer-classics:2.0.0-alpha-1'
implementation 'com.tencent.iot.thirdparty.android:media-server:1.0.2'
}