1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- // 定义适用于所有模块的依赖项 Top-level build file where you can add configuration options common to all sub-projects/modules.
- buildscript {
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:7.0.1"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
- }
-
- task clean(type: Delete) {
- delete rootProject.buildDir
- }
-
- //在项目级别定义某些属性并在所有模块之间共享这些属性
- ext {
- android = [
- compile_sdk_version: 30, //使用rootProject.ext.android.compile_sdk_version
- build_tools_version: "30.0.2",
- min_sdk_version : 21,
- target_sdk_version : 30,
- version_code : 100,
- version_name : "100",
- applicationId : "com.xkl.cdl"
- ]
- versions = [
- core_ktx_version : "1.3.2",
- appcompat_version: "1.2.0",
- material_version : "1.3.0",
- ]
- //必须依赖
- dependencies_required = [
- //为属于Android框架的通用库提供扩展程序
- core_ktx : "androidx.core:core-ktx:${versions.core_ktx_version}",
- //Androidx 依赖
- appcompat: "androidx.appcompat:appcompat:${versions.appcompat_version}",
- //material_design
- material : "com.google.android.material:material:${versions.material_version}",
- ]
- dependencies_testImplementation = [
- junit: "junit:junit:4.+"
- ]
- dependencies_androidTestImplementation = [
- test_ext_junit : "androidx.test.ext:junit:1.1.2",
- test_espresson_core: "androidx.test.espresso:espresso-core:3.3.0"
- ]
- //按需依赖项
- dependencies_custom = []
-
-
- }
|