80 lines
3.7 KiB
Groovy
80 lines
3.7 KiB
Groovy
|
|
apply plugin: 'com.android.library'
|
||
|
|
|
||
|
|
android {
|
||
|
|
compileSdkVersion 30
|
||
|
|
|
||
|
|
defaultConfig {
|
||
|
|
minSdkVersion 24
|
||
|
|
targetSdkVersion 28
|
||
|
|
|
||
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
|
|
consumerProguardFiles 'consumer-rules.pro'
|
||
|
|
}
|
||
|
|
|
||
|
|
buildTypes {
|
||
|
|
release {
|
||
|
|
buildConfigField "boolean", "LOG_DEBUG", "false" //不显示log
|
||
|
|
minifyEnabled false //混淆-混淆目前有问题,会闪退
|
||
|
|
shrinkResources false //资源压缩
|
||
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||
|
|
// buildConfigField ("String","TCP_IP","\"${TCP_IP}\"")
|
||
|
|
// buildConfigField ("Integer","TCP_PORT","${TCP_PORT}")
|
||
|
|
buildConfigField ("String","ENVIR_NAME","\"${ENVIR_NAME}\"")
|
||
|
|
buildConfigField ("String","BASE_URL","\"${BASE_URL}\"")
|
||
|
|
buildConfigField ("String","BASE_URL_NO_PORT","\"${BASE_URL_NO_PORT}\"")
|
||
|
|
buildConfigField ("String","UPLOAD_URL","\"${UPLOAD_URL}\"")
|
||
|
|
buildConfigField ("String","PATH_OF_UPLOAD_EVENT","\"${PATH_OF_UPLOAD_EVENT}\"")
|
||
|
|
}
|
||
|
|
debug {
|
||
|
|
// buildConfigField "boolean", "LOG_DEBUG", "true" //不显示log
|
||
|
|
// buildConfigField ("String","TCP_IP","\"${TCP_IP}\"")
|
||
|
|
// buildConfigField ("Integer","TCP_PORT","${TCP_PORT}")
|
||
|
|
buildConfigField ("String","ENVIR_NAME","\"${ENVIR_NAME}\"")
|
||
|
|
buildConfigField ("String","BASE_URL","\"${BASE_URL}\"")
|
||
|
|
buildConfigField ("String","BASE_URL_NO_PORT","\"${BASE_URL_NO_PORT}\"")
|
||
|
|
buildConfigField ("String","UPLOAD_URL","\"${UPLOAD_URL}\"")
|
||
|
|
buildConfigField ("String","PATH_OF_UPLOAD_EVENT","\"${PATH_OF_UPLOAD_EVENT}\"")
|
||
|
|
// buildConfigField ("String","TCP_IP","\"${TCP_IP_DEBUG}\"")
|
||
|
|
// buildConfigField ("Integer","TCP_PORT","\"${TCP_PORT_DEBUG}\"")
|
||
|
|
// buildConfigField ("String","ENVIR_NAME","\"${ENVIR_NAME_DEBUG}\"")
|
||
|
|
// buildConfigField ("String","BASE_URL","\"${BASE_URL_DEBUG}\"")
|
||
|
|
// buildConfigField ("String","BASE_URL_NO_PORT","\"${BASE_URL_NO_PORT_DEBUG}\"")
|
||
|
|
// buildConfigField ("String","UPLOAD_URL","\"${UPLOAD_URL_DEBUG}\"")
|
||
|
|
// buildConfigField ("String","PATH_OF_UPLOAD_EVENT","\"${PATH_OF_UPLOAD_EVENT_DEBUG }\"")
|
||
|
|
}
|
||
|
|
demo {
|
||
|
|
buildConfigField "boolean", "LOG_DEBUG", "false" //不显示log
|
||
|
|
// buildConfigField ("String","TCP_IP","\"${TCP_IP_DEMO}\"")
|
||
|
|
// buildConfigField ("Integer","TCP_PORT","${TCP_PORT_DEMO}")
|
||
|
|
buildConfigField ("String","ENVIR_NAME","\"${ENVIR_NAME_DEMO}\"")
|
||
|
|
buildConfigField ("String","BASE_URL","\"${BASE_URL_DEMO}\"")
|
||
|
|
buildConfigField ("String","BASE_URL_NO_PORT","\"${BASE_URL_NO_PORT_DEMO}\"")
|
||
|
|
buildConfigField ("String","UPLOAD_URL","\"${UPLOAD_URL_DEMO}\"")
|
||
|
|
buildConfigField ("String","PATH_OF_UPLOAD_EVENT","\"${PATH_OF_UPLOAD_EVENT_DEMO}\"")
|
||
|
|
}
|
||
|
|
}
|
||
|
|
namespace 'com.airkoon.cellsys_rx'
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
dependencies {
|
||
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||
|
|
|
||
|
|
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||
|
|
testImplementation 'junit:junit:4.12'
|
||
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
||
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||
|
|
|
||
|
|
//okhttp3
|
||
|
|
api 'com.squareup.okhttp3:okhttp:3.12.1'
|
||
|
|
api 'com.squareup.okio:okio:1.15.0'
|
||
|
|
//rxjava
|
||
|
|
api 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||
|
|
api 'io.reactivex.rxjava2:rxjava:2.2.11'
|
||
|
|
//fastjson
|
||
|
|
implementation 'com.alibaba:fastjson:1.1.41'
|
||
|
|
//MQTT
|
||
|
|
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0'
|
||
|
|
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
|
||
|
|
}
|