91 lines
3.3 KiB
Groovy
91 lines
3.3 KiB
Groovy
plugins {
|
|
id 'com.android.library'
|
|
id 'kotlin-android'
|
|
id 'kotlin-android-extensions'
|
|
id 'kotlin-kapt'
|
|
id 'com.alibaba.arouter'
|
|
id 'com.google.protobuf'
|
|
}
|
|
android {
|
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
|
defaultConfig {
|
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
|
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
|
versionCode Integer.valueOf(VERSION_CODE)
|
|
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
consumerProguardFiles 'consumer-rules.pro'
|
|
//ARouter apt 参数
|
|
kapt {
|
|
useBuildCache = false
|
|
arguments {
|
|
arg("AROUTER_MODULE_NAME", project.getName())
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
protobuf {
|
|
protoc {
|
|
artifact = rootProject.ext.dependencies.protoc
|
|
}
|
|
generateProtoTasks {
|
|
all().each { task ->
|
|
task.builtins {
|
|
java {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
|
implementation rootProject.ext.dependencies.coroutinescore
|
|
implementation rootProject.ext.dependencies.coroutinesandroid
|
|
implementation rootProject.ext.dependencies.androidxccorektx
|
|
implementation rootProject.ext.dependencies.androidxappcompat
|
|
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
|
implementation rootProject.ext.dependencies.localbroadcastmanager
|
|
implementation rootProject.ext.dependencies.arouter
|
|
implementation rootProject.ext.dependencies.rxandroid
|
|
implementation rootProject.ext.dependencies.flexbox
|
|
kapt rootProject.ext.dependencies.aroutercompiler
|
|
implementation rootProject.ext.dependencies.protobuf_java
|
|
implementation rootProject.ext.dependencies.protobuf_java_util
|
|
implementation rootProject.ext.dependencies.mogoaicloudtrafficlive
|
|
|
|
|
|
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
|
implementation rootProject.ext.dependencies.mogocommons
|
|
implementation rootProject.ext.dependencies.mogo_core_data
|
|
implementation rootProject.ext.dependencies.mogo_core_utils
|
|
implementation rootProject.ext.dependencies.mogo_core_function_call
|
|
implementation rootProject.ext.dependencies.mogo_core_res
|
|
compileOnly rootProject.ext.dependencies.mogomap
|
|
} else {
|
|
implementation project(":foudations:mogo-commons")
|
|
implementation project(':core:mogo-core-data')
|
|
implementation project(':core:mogo-core-utils')
|
|
implementation project(':core:mogo-core-function-call')
|
|
implementation project(':core:mogo-core-res')
|
|
implementation project(':libraries:mogo-adas')
|
|
compileOnly project(':libraries:mogo-map')
|
|
}
|
|
}
|
|
|
|
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|