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.

config.gradle 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // 通用配置
  2. android {
  3. // 编译源码版本
  4. compileSdkVersion 30
  5. defaultConfig {
  6. // 最低安装版本
  7. minSdkVersion 21
  8. // 目标适配版本
  9. targetSdkVersion 30
  10. versionName '1.0'
  11. versionCode 10
  12. //versionCode new Date().format("yyyyMMdd") as int
  13. }
  14. // 支持 Java JDK 8
  15. compileOptions {
  16. targetCompatibility JavaVersion.VERSION_1_8
  17. sourceCompatibility JavaVersion.VERSION_1_8
  18. }
  19. // 设置存放 so 文件的目录
  20. sourceSets {
  21. main {
  22. jniLibs.srcDirs = ['libs']
  23. }
  24. }
  25. // 代码警告配置
  26. lintOptions {
  27. // 禁用文本硬编码警告
  28. disable 'HardcodedText'
  29. }
  30. // 可在 Studio 左侧 Build Variants 选项中切换默认的构建模式
  31. buildTypes {
  32. // 调试版本
  33. debug {}
  34. // 预览版本
  35. preview {}
  36. // 正式版本
  37. release {}
  38. }
  39. }
  40. dependencies {
  41. // 依赖 libs 目录下所有的 jar 和 aar 包
  42. implementation fileTree(include: ["*.jar", '*.aar'], dir: "libs")
  43. // 谷歌兼容库:https://developer.android.google.cn/jetpack/androidx/releases/appcompat?hl=zh-cn
  44. implementation 'androidx.appcompat:appcompat:1.2.0'
  45. implementation 'com.google.android.material:material:1.2.1'
  46. }