build.gradle 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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.4.2'
  5. kotlin_version = '1.8.10'
  6. }
  7. }
  8. plugins {
  9. id 'com.android.application' version '7.4.2' apply false
  10. id 'com.android.library' version '7.4.2' apply false
  11. id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
  12. id 'org.jetbrains.kotlin.jvm' version '1.8.10' apply false
  13. }
  14. project.ext {
  15. // SDK and Tools
  16. compileSdkVersion = 33
  17. targetSdkVersion = 33
  18. buildToolsVersion = "30.0.3"
  19. minSdkVersion = 21
  20. versionCode = 1
  21. versionName = "1.0"
  22. setDefaultConfig = {
  23. extension ->
  24. extension.compileSdkVersion project.ext.compileSdkVersion
  25. extension.buildToolsVersion project.ext.buildToolsVersion
  26. extension.defaultConfig {
  27. // applicationId project.ext.applicationId
  28. // 使用project.ext.minSdkVersion 代替minsdkVersion,直接使用minsdkVersion 引不到
  29. minSdkVersion project.ext.minSdkVersion
  30. targetSdkVersion project.ext.targetSdkVersion
  31. versionCode project.ext.versionCode
  32. versionName project.ext.versionName
  33. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  34. }
  35. }
  36. }
  37. task clean(type: Delete) {
  38. delete rootProject.buildDir
  39. }