build.gradle 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. ext {
  4. compose_version = '1.2.0'
  5. kotlin_version = '1.7.0'
  6. }
  7. }
  8. plugins {
  9. id 'com.android.application' version '7.2.0' apply false
  10. id 'com.android.library' version '7.2.0' apply false
  11. id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
  12. }
  13. project.ext {
  14. // SDK and Tools
  15. compileSdkVersion = 33
  16. targetSdkVersion = 33
  17. buildToolsVersion = "30.0.3"
  18. minSdkVersion = 21
  19. versionCode = 1
  20. versionName = "1.0"
  21. setDefaultConfig = {
  22. extension ->
  23. extension.compileSdkVersion project.ext.compileSdkVersion
  24. extension.buildToolsVersion project.ext.buildToolsVersion
  25. extension.defaultConfig {
  26. // applicationId project.ext.applicationId
  27. // 使用project.ext.minSdkVersion 代替minsdkVersion,直接使用minsdkVersion 引不到
  28. minSdkVersion project.ext.minSdkVersion
  29. targetSdkVersion project.ext.targetSdkVersion
  30. versionCode project.ext.versionCode
  31. versionName project.ext.versionName
  32. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  33. }
  34. }
  35. }
  36. task clean(type: Delete) {
  37. delete rootProject.buildDir
  38. }