[desc]:抽象公共配置

[author]:wangyimiao
master
yimiao 3 years ago
parent 8216c12bd7
commit 8ef7ebdebf

@ -1,25 +1,10 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
}
apply from: "${rootProject.rootDir}/buildCommon/commonLibConfig.gradle"
project.ext.setAppDefaultConfig project
project.ext.setArouterConfig project
android {
compileSdkVersion rootProject.ext.versions.compileSdkVersion
buildToolsVersion rootProject.ext.versions.buildToolsVersion
defaultConfig {
applicationId "com.common.commonlibtest"
minSdkVersion rootProject.ext.versions.minSdkVersion
targetSdkVersion rootProject.ext.versions.targetSdkVersion
versionCode rootProject.ext.versions.versionCode
versionName rootProject.ext.versions.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
@ -43,13 +28,8 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
dataBinding true
viewBinding true
}
}

@ -103,7 +103,7 @@ project.ext {
}
/**
* android library default config
* android library config
*/
setLibDefaultConfig = {
extension ->
@ -117,6 +117,21 @@ project.ext {
setDependencies extension.dependencies
}
/**
* android application config
*/
setAppDefaultConfig = {
extension ->
extension.apply plugin: 'com.android.application'
extension.apply plugin: 'kotlin-android'
extension.apply plugin: 'kotlin-parcelize'
extension.apply plugin: 'kotlin-kapt'
extension.description "lib"
setAndroidConfig extension.android
setDependencies extension.dependencies
}
/**
* android library common config
*/

@ -21,4 +21,6 @@ dependencies {
// kotlin
implementation rootProject.ext.dependencies.kotlin
// rxAndroid
implementation rootProject.ext.dependencies.rxandroid
}

@ -25,10 +25,9 @@ import com.common.bluetooth.service.BLEClientService.BLEClientBinder
import com.common.bluetooth.service.BLEReceiveService
import com.common.bluetooth.service.BLEReceiveService.ReceiverBinder
import com.common.bluetooth.service.BluetoothLeClient
import io.reactivex.Observer
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import java.nio.charset.Charset
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.core.Observer
import io.reactivex.rxjava3.disposables.Disposable
import java.util.concurrent.atomic.AtomicBoolean
/**

Loading…
Cancel
Save