|
|
|
@ -1,13 +1,4 @@
|
|
|
|
|
ext {
|
|
|
|
|
android = [
|
|
|
|
|
compileSdkVersion: 30,
|
|
|
|
|
buildToolsVersion: "30.0.3",
|
|
|
|
|
minSdkVersion : 23,
|
|
|
|
|
targetSdkVersion : 28,
|
|
|
|
|
versionCode : 1,
|
|
|
|
|
versionName : "1.0"
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
project.ext {
|
|
|
|
|
sign = [
|
|
|
|
|
keystore_path : "../innovationapp.jks",
|
|
|
|
|
keystore_pwd : "123456",
|
|
|
|
@ -20,6 +11,14 @@ ext {
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
versions = [
|
|
|
|
|
compileSdkVersion : 30,
|
|
|
|
|
buildToolsVersion : "30.0.3",
|
|
|
|
|
minSdkVersion : 23,
|
|
|
|
|
targetSdkVersion : 28,
|
|
|
|
|
versionCode : 1,
|
|
|
|
|
versionName : "1.0",
|
|
|
|
|
jvmTarget : "1.8",
|
|
|
|
|
|
|
|
|
|
appcompat : "1.2.0",
|
|
|
|
|
material : "1.2.1",
|
|
|
|
|
okhttp : "4.9.1",
|
|
|
|
@ -38,6 +37,7 @@ ext {
|
|
|
|
|
luban : "1.1.8",
|
|
|
|
|
kotlin_android : "1.4.1",
|
|
|
|
|
gson : "2.8.6",
|
|
|
|
|
arouter : "1.5.2",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
@ -63,5 +63,77 @@ ext {
|
|
|
|
|
photo_view : "com.github.chrisbanes:PhotoView:${versions.photo_view}",
|
|
|
|
|
luban : "top.zibin:Luban:${versions.luban}",
|
|
|
|
|
gson : "com.google.code.gson:gson${versions.gson}",
|
|
|
|
|
arouter : "com.alibaba:arouter-api:${versions.arouter}",
|
|
|
|
|
arouter_compiler : "com.alibaba:arouter-compiler:${versions.arouter}",
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* android project android {} default config
|
|
|
|
|
*/
|
|
|
|
|
setAndroidConfig = {
|
|
|
|
|
extension ->
|
|
|
|
|
extension.compileSdkVersion versions.compileSdkVersion
|
|
|
|
|
|
|
|
|
|
extension.defaultConfig {
|
|
|
|
|
minSdkVersion versions.minSdkVersion
|
|
|
|
|
targetSdkVersion versions.targetSdkVersion
|
|
|
|
|
versionCode versions.versionCode
|
|
|
|
|
versionName versions.vserionName
|
|
|
|
|
|
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extension.compileOptions {
|
|
|
|
|
targetCompatibility = compileOptions.targetCompatibility
|
|
|
|
|
sourceCompatibility = compileOptions.sourceCompatibility
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extension.kotlinOptions {
|
|
|
|
|
jvmTarget = versions.jvmTarget
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* android project dependencies {} default config
|
|
|
|
|
*/
|
|
|
|
|
setDependencies = {
|
|
|
|
|
extension ->
|
|
|
|
|
extension.implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* android library default config
|
|
|
|
|
*/
|
|
|
|
|
setLibDefaultConfig = {
|
|
|
|
|
extension ->
|
|
|
|
|
extension.apply plugin: 'com.android.library'
|
|
|
|
|
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
|
|
|
|
|
*/
|
|
|
|
|
setArouterConfig = {
|
|
|
|
|
extension ->
|
|
|
|
|
extension.android.defaultConfig {
|
|
|
|
|
javaCompileOptions {
|
|
|
|
|
annotationProcessorOptions {
|
|
|
|
|
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 添加ARouter依赖
|
|
|
|
|
extension.dependencies.implementation(rootProject.ext.dependencies.arouter) {
|
|
|
|
|
exclude group: 'com.android.support'
|
|
|
|
|
}
|
|
|
|
|
extension.dependencies.annotationProcessor rootProject.ext.dependencies.arouter_compiler
|
|
|
|
|
}
|
|
|
|
|
}
|