build.gradle 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. repositories {
  4. google()
  5. jcenter()
  6. }
  7. dependencies {
  8. classpath 'com.android.tools.build:gradle:3.4.1'
  9. // NOTE: Do not place your application dependencies here; they belong
  10. // in the individual module build.gradle files
  11. }
  12. ext.versions = [
  13. 'minSdk' : 19,
  14. 'targetSdk' : 28,
  15. 'compileSdk' : 28,
  16. 'Java' : JavaVersion.VERSION_1_8,
  17. 'supportLibrary' : '28.0.0',
  18. 'versionCode' : 1,
  19. 'versionName' : "1.0.1"
  20. ]
  21. // 引用的lib
  22. ext.lib = [
  23. /** 常备底层库*/
  24. support : [
  25. v7 : "com.android.support:appcompat-v7:${versions.supportLibrary}",
  26. constraint_layout : 'com.android.support.constraint:constraint-layout:1.1.3',
  27. appcompat : 'androidx.appcompat:appcompat:1.0.2',
  28. constraintlayout : 'androidx.constraintlayout:constraintlayout:1.1.3',
  29. ],
  30. test : [
  31. junit : 'junit:junit:4.12',
  32. runner : 'com.android.support.test:runner:1.0.2',
  33. espresso: 'com.android.support.test.espresso:espresso-core:3.0.2',
  34. test_runner : 'androidx.test.runner.AndroidJUnitRunner',
  35. ],
  36. //其他依赖组件
  37. dependency_library :[
  38. nohttp : 'com.yanzhenjie.nohttp:nohttp:1.1.11',
  39. gson :'com.google.code.gson:gson:2.8.6',
  40. GSYVideoPlayer : 'com.shuyu:GSYVideoPlayer:7.0.2'
  41. ],
  42. ]
  43. }
  44. allprojects {
  45. repositories {
  46. google()
  47. jcenter()
  48. }
  49. }
  50. task clean(type: Delete) {
  51. delete rootProject.buildDir
  52. }