apply plugin: 'com.android.library' android { compileSdkVersion 30 defaultConfig { minSdkVersion 24 targetSdkVersion 29 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","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 ("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}\"") } } 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的依赖包 implementation 'io.reactivex.rxjava3:rxandroid:3.0.0' implementation 'io.reactivex.rxjava3:rxjava:3.0.0' //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' }