build.gradle 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. apply from: "config.gradle"
  3. buildscript {
  4. ext.kotlin_version = "1.6.10"
  5. repositories {
  6. maven { url 'http://127.0.0.1:1022/repository/maven-public/' }
  7. // maven {
  8. // allowInsecureProtocol true
  9. // url 'http://xuqinmin.com.cn:8081/repository/android-group/'
  10. // }
  11. }
  12. dependencies {
  13. classpath 'com.android.tools.build:gradle:7.2.0'
  14. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0"
  15. // NOTE: Do not place your application dependencies here; they belong
  16. // in the individual module build.gradle files
  17. }
  18. }
  19. allprojects {
  20. repositories {
  21. // google()
  22. // jcenter()
  23. // maven { url 'http://developer.huawei.com/repo/' }
  24. maven { url 'http://127.0.0.1:1022/repository/maven-public/' }
  25. // maven {
  26. // allowInsecureProtocol true
  27. // url 'http://xuqinmin.com.cn:8081/repository/android-group/'
  28. // }
  29. }
  30. }
  31. //全局配置,所有module都可以用到
  32. subprojects {
  33. afterEvaluate {
  34. android {
  35. buildFeatures.dataBinding = true
  36. compileOptions {
  37. sourceCompatibility JavaVersion.VERSION_11
  38. targetCompatibility JavaVersion.VERSION_11
  39. }
  40. kotlinOptions {
  41. jvmTarget = "11"
  42. }
  43. }
  44. }
  45. }
  46. task clean(type: Delete) {
  47. delete rootProject.buildDir
  48. }