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","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","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","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","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.6.1' 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' /*google官方数据库框架 ROOM*/ def room_version = "2.6.1" api "androidx.room:room-runtime:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version" api "androidx.room:room-rxjava2:$room_version" api "androidx.room:room-guava:$room_version" testImplementation "androidx.room:room-testing:$room_version" }