67 lines
2.3 KiB
Groovy
67 lines
2.3 KiB
Groovy
|
|
plugins {
|
||
|
|
id 'com.android.library'
|
||
|
|
}
|
||
|
|
|
||
|
|
android {
|
||
|
|
compileSdkVersion 30
|
||
|
|
|
||
|
|
defaultConfig {
|
||
|
|
minSdkVersion 24
|
||
|
|
targetSdkVersion 28
|
||
|
|
|
||
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
|
|
consumerProguardFiles 'consumer-rules.pro'
|
||
|
|
|
||
|
|
//指定room.schemaLocation生成的文件路径
|
||
|
|
javaCompileOptions {
|
||
|
|
annotationProcessorOptions {
|
||
|
|
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
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}\"")
|
||
|
|
}
|
||
|
|
debug {
|
||
|
|
buildConfigField "boolean", "LOG_DEBUG", "true" //不显示log
|
||
|
|
buildConfigField ("String","ENVIR_NAME","\"${ENVIR_NAME_DEBUG}\"")
|
||
|
|
}
|
||
|
|
demo {
|
||
|
|
buildConfigField "boolean", "LOG_DEBUG", "false" //不显示log
|
||
|
|
buildConfigField ("String","ENVIR_NAME","\"${ENVIR_NAME_DEMO}\"")
|
||
|
|
}
|
||
|
|
}
|
||
|
|
compileOptions {
|
||
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
||
|
|
}
|
||
|
|
namespace 'com.airkoon.ble'
|
||
|
|
}
|
||
|
|
|
||
|
|
dependencies {
|
||
|
|
|
||
|
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||
|
|
implementation 'com.google.android.material:material:1.2.1'
|
||
|
|
api files('libs\\cellsysAnalyticalTools.jar')
|
||
|
|
testImplementation 'junit:junit:4.+'
|
||
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||
|
|
|
||
|
|
|
||
|
|
/*google官方数据库框架 ROOM*/
|
||
|
|
def room_version = "2.2.6"
|
||
|
|
api "androidx.room:room-runtime:$room_version"
|
||
|
|
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||
|
|
// optional - RxJava support for Room
|
||
|
|
api "androidx.room:room-rxjava2:$room_version"
|
||
|
|
// optional - Guava support for Room, including Optional and ListenableFuture
|
||
|
|
api "androidx.room:room-guava:$room_version"
|
||
|
|
// optional - Test helpers
|
||
|
|
testImplementation "androidx.room:room-testing:$room_version"
|
||
|
|
}
|