1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- // 定义适用于所有模块的依赖项 Top-level build file where you can add configuration options common to all sub-projects/modules.
- buildscript {
- repositories {
- google()
- mavenCentral()
-
- maven { url 'https://jitpack.io' }
- }
- 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: 31, //使用rootProject.ext.android.compile_sdk_version
- build_tools_version: "30.0.2",
- min_sdk_version : 21,
- target_sdk_version : 31,
- version_code : 100,
- version_name : "100",
- applicationId : "com.xkl.cdl"
- ]
- versions = [
- core_ktx_version : "1.3.2",
- appcompat_version: "1.4.1",
- material_version : "1.3.0",
- lifecycle_version: "2.5.0-alpha02",
- glide_version : "4.11.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}",
- //constraintlayout
- constraintlayout : "androidx.constraintlayout:constraintlayout:2.0.4",
- //lifecycle
- // lifecycle : "androidx.lifecycle:lifecycle-runtime-ktx:${versions.lifecycle_version}",
- // //lifecycle saved state module for viewmodel
- //// lifecycle_viewmodel_savestate: "androidx.lifecycle:lifecycle-viewmodel-savedstate:${versions.lifecycle_version}",
- // //ViewModel
- // viewmodel : "androidx.lifecycle:lifecycle-viewmodel-ktx:${versions.lifecycle_version}",
- // //livedata
- // livedata : "androidx.lifecycle:lifecycle-livedata-ktx:${versions.lifecycle_version}",
- //java8 lifecycle_compiler
- // lifecycle_compiler : "androidx.lifecycle:lifecycle-common-java8:${versions.lifecycle_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 = [
- //设置状态栏和导航栏的框架 https://github.com/Zackratos/UltimateBarX
- UltimateBarX: "com.gitee.zackratos:UltimateBarX:0.8.0",
- //Glide 依赖和配置
- Glide : "com.github.bumptech.glide:glide:${versions.glide_version}",
- GlideCompiler : "com.github.bumptech.glide:compiler:${versions.glide_version}",
- //Glide translation
- GlideTranslation: "jp.wasabeef:glide-transformations:4.3.0"
- ]
-
-
- }
|