build.gradle 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. apply plugin: 'com.android.application'
  2. repositories {
  3. mavenCentral()
  4. google()
  5. }
  6. configurations {
  7. compile.exclude module: 'support-v4'
  8. }
  9. configurations.all {
  10. exclude group: 'com.google.firebase', module: 'firebase-core'
  11. exclude group: 'androidx.recyclerview', module: 'recyclerview'
  12. }
  13. dependencies {
  14. implementation project(':TMessagesProj')
  15. implementation 'androidx.multidex:multidex:2.0.1'
  16. coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
  17. implementation files('../TMessagesProj/libs/libgsaverification-client.aar')
  18. implementation "com.microsoft.appcenter:appcenter-distribute:3.3.1"
  19. implementation "com.microsoft.appcenter:appcenter-crashes:3.3.1"
  20. }
  21. android {
  22. compileSdkVersion 31
  23. buildToolsVersion '31.0.0'
  24. defaultConfig.applicationId = APP_PACKAGE
  25. sourceSets.main.jniLibs.srcDirs = ['../TMessagesProj/jni/']
  26. lintOptions {
  27. disable 'MissingTranslation'
  28. disable 'ExtraTranslation'
  29. disable 'BlockedPrivateApi'
  30. }
  31. dexOptions {
  32. jumboMode = true
  33. }
  34. compileOptions {
  35. sourceCompatibility JavaVersion.VERSION_1_8
  36. targetCompatibility JavaVersion.VERSION_1_8
  37. coreLibraryDesugaringEnabled true
  38. }
  39. // dataBinding {
  40. // enabled = true
  41. // }
  42. // signingConfigs {
  43. // debug {
  44. // storeFile file("../TMessagesProj/config/release.keystore")
  45. // storePassword RELEASE_STORE_PASSWORD
  46. // keyAlias RELEASE_KEY_ALIAS
  47. // keyPassword RELEASE_KEY_PASSWORD
  48. // }
  49. //
  50. // release {
  51. // storeFile file("../TMessagesProj/config/release.keystore")
  52. // storePassword RELEASE_STORE_PASSWORD
  53. // keyAlias RELEASE_KEY_ALIAS
  54. // keyPassword RELEASE_KEY_PASSWORD
  55. // }
  56. // }
  57. // buildTypes {
  58. // HA_private {
  59. // debuggable false
  60. // jniDebuggable false
  61. // signingConfig signingConfigs.debug
  62. // applicationIdSuffix ".beta"
  63. // minifyEnabled true
  64. // multiDexEnabled true
  65. // proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro'
  66. // ndk.debugSymbolLevel = 'FULL'
  67. // }
  68. // HA_public {
  69. // debuggable false
  70. // jniDebuggable false
  71. // signingConfig signingConfigs.debug
  72. // applicationIdSuffix ".beta"
  73. // minifyEnabled true
  74. // multiDexEnabled true
  75. // proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro'
  76. // ndk.debugSymbolLevel = 'FULL'
  77. // }
  78. // }
  79. // sourceSets.HA_private {
  80. // manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest.xml'
  81. // }
  82. // sourceSets.HA_public {
  83. // manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest.xml'
  84. // }
  85. flavorDimensions "minApi"
  86. productFlavors {
  87. bundleAfat {
  88. ndk {
  89. abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
  90. }
  91. ext {
  92. abiVersionCode = 1
  93. }
  94. }
  95. bundleAfat_SDK23 {
  96. ndk {
  97. abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
  98. }
  99. minSdkVersion 23
  100. ext {
  101. abiVersionCode = 2
  102. }
  103. }
  104. afat {
  105. ndk {
  106. abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
  107. }
  108. ext {
  109. abiVersionCode = 9
  110. }
  111. }
  112. }
  113. defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE)
  114. applicationVariants.all { variant ->
  115. variant.outputs.all { output ->
  116. outputFileName = "app.apk"
  117. output.versionCodeOverride = defaultConfig.versionCode * 10 + variant.productFlavors.get(0).abiVersionCode
  118. }
  119. }
  120. variantFilter { variant ->
  121. def names = variant.flavors*.name
  122. if (variant.buildType.name != "release" && !names.contains("afat")) {
  123. setIgnore(true)
  124. }
  125. }
  126. defaultConfig {
  127. minSdkVersion 19
  128. targetSdkVersion 30
  129. versionName APP_VERSION_NAME
  130. ndkVersion "21.4.7075529"
  131. multiDexEnabled true
  132. vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']
  133. externalNativeBuild {
  134. cmake {
  135. version '3.10.2'
  136. arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-16', "-j=16"
  137. }
  138. }
  139. }
  140. buildFeatures {
  141. buildConfig = true
  142. }
  143. lintOptions {
  144. checkReleaseBuilds false
  145. }
  146. }
  147. apply plugin: 'com.google.gms.google-services'