You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.4 KiB
77 lines
2.4 KiB
2 months ago
|
plugins {
|
||
|
id 'org.jetbrains.kotlin.android'
|
||
|
}
|
||
|
if (Boolean.valueOf(rootProject.ext.isModule)) {
|
||
|
apply plugin: 'com.android.application'
|
||
|
} else {
|
||
|
apply plugin: 'com.android.library'
|
||
|
}
|
||
|
android {
|
||
|
namespace 'com.techscan.modulemain'
|
||
|
compileSdk rootProject.ext.version.compileSdkVersion
|
||
|
|
||
|
defaultConfig {
|
||
|
minSdk rootProject.ext.version.minSdkVersion
|
||
|
targetSdk rootProject.ext.version.targetSdkVersion
|
||
|
versionCode rootProject.ext.version.versionCode
|
||
|
versionName rootProject.ext.version.versionName
|
||
|
|
||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
|
|
||
|
//Arouter路由配置
|
||
|
javaCompileOptions {
|
||
|
annotationProcessorOptions {
|
||
|
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
buildTypes {
|
||
|
release {
|
||
|
//minifyEnabled true //是否开启混淆,其实子模块中这个已经没有作用了,由主模块控制
|
||
|
consumerProguardFiles 'proguard-rules.pro' //子模块要用这个命令才能生效
|
||
|
}
|
||
|
debug {
|
||
|
//测试混淆用
|
||
|
consumerProguardFiles 'proguard-rules.pro' //子模块要用这个命令才能生效
|
||
|
}
|
||
|
}
|
||
|
//java插件引入了一个概念叫做SourceSets,通过修改SourceSets中的属性,可以指定哪些源文件
|
||
|
//( 或文件夹下的源文件 ) 要被编译 , 哪些源文件要被排除 。
|
||
|
sourceSets {
|
||
|
main {
|
||
|
if (Boolean.valueOf(rootProject.ext.isModule)) {
|
||
|
manifest.srcFile 'src/main/module/AndroidManifest.xml'
|
||
|
} else {
|
||
|
manifest.srcFile 'src/main/AndroidManifest.xml'
|
||
|
java {
|
||
|
//排除java/debug文件夹下的所有文件
|
||
|
exclude '*module'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
compileOptions {
|
||
|
sourceCompatibility JavaVersion.VERSION_17
|
||
|
targetCompatibility JavaVersion.VERSION_17
|
||
|
}
|
||
|
|
||
|
viewBinding {
|
||
|
enabled = true
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
implementation project(path: ':module_base')
|
||
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||
|
implementation 'com.google.android.material:material:1.8.0'
|
||
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||
|
//公用依赖包
|
||
|
//Arouter路由 组件必须添加否则跳转页面失败
|
||
|
annotationProcessor (rootProject.ext.libsDependency.arouter_compiler)
|
||
|
|
||
|
|
||
|
}
|