build.gradle 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. plugins {
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. }
  5. def keystorePropertiesFile = rootProject.file("keystore.properties")
  6. def keystoreProperties = new Properties()
  7. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  8. android {
  9. compileSdkVersion rootProject.ext.android.compileSdkVersion
  10. buildToolsVersion rootProject.ext.android.buildToolsVersion
  11. defaultConfig {
  12. applicationId "com.demo.xinrui"
  13. minSdkVersion rootProject.ext.android.minSdkVersion
  14. targetSdkVersion rootProject.ext.android.targetSdkVersion
  15. versionCode 1
  16. versionName "1.0.0"
  17. ndk {
  18. // 设置支持的SO库架构
  19. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  20. }
  21. }
  22. signingConfigs {
  23. config {
  24. keyAlias keystoreProperties['keyAlias']
  25. keyPassword keystoreProperties['keyPassword']
  26. storeFile file(keystoreProperties['storeFile'])
  27. storePassword keystoreProperties['storePassword']
  28. v1SigningEnabled true
  29. v2SigningEnabled true
  30. }
  31. }
  32. buildTypes {
  33. debug {
  34. minifyEnabled false
  35. signingConfig signingConfigs.config
  36. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  37. }
  38. release {
  39. minifyEnabled false
  40. signingConfig signingConfigs.config
  41. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  42. }
  43. }
  44. lintOptions {
  45. abortOnError false
  46. }
  47. repositories {
  48. flatDir {
  49. dirs 'libs'
  50. }
  51. }
  52. dexOptions {
  53. preDexLibraries = false
  54. }
  55. compileOptions {
  56. sourceCompatibility JavaVersion.VERSION_1_8
  57. targetCompatibility JavaVersion.VERSION_1_8
  58. }
  59. kotlinOptions {
  60. jvmTarget = '1.8'
  61. }
  62. }
  63. dependencies {
  64. implementation project(':library_xinrui')
  65. }