学考乐离线App
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.

build.gradle 1.9KB

2 years ago
2 years ago
2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // 定义适用于所有模块的依赖项 Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. repositories {
  4. google()
  5. mavenCentral()
  6. }
  7. dependencies {
  8. classpath "com.android.tools.build:gradle:7.0.1"
  9. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
  10. // NOTE: Do not place your application dependencies here; they belong
  11. // in the individual module build.gradle files
  12. }
  13. }
  14. task clean(type: Delete) {
  15. delete rootProject.buildDir
  16. }
  17. //在项目级别定义某些属性并在所有模块之间共享这些属性
  18. ext {
  19. android = [
  20. compile_sdk_version: 30, //使用rootProject.ext.android.compile_sdk_version
  21. build_tools_version: "30.0.2",
  22. min_sdk_version : 21,
  23. target_sdk_version : 30,
  24. version_code : 100,
  25. version_name : "100",
  26. applicationId : "com.xkl.cdl"
  27. ]
  28. versions = [
  29. core_ktx_version : "1.3.2",
  30. appcompat_version: "1.2.0",
  31. material_version : "1.3.0",
  32. ]
  33. //必须依赖
  34. dependencies_required = [
  35. //为属于Android框架的通用库提供扩展程序
  36. core_ktx : "androidx.core:core-ktx:${versions.core_ktx_version}",
  37. //Androidx 依赖
  38. appcompat: "androidx.appcompat:appcompat:${versions.appcompat_version}",
  39. //material_design
  40. material : "com.google.android.material:material:${versions.material_version}",
  41. ]
  42. dependencies_testImplementation = [
  43. junit: "junit:junit:4.+"
  44. ]
  45. dependencies_androidTestImplementation = [
  46. test_ext_junit : "androidx.test.ext:junit:1.1.2",
  47. test_espresson_core: "androidx.test.espresso:espresso-core:3.3.0"
  48. ]
  49. //按需依赖项
  50. dependencies_custom = []
  51. }