build.gradle 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'com.antfortune.freeline'
  3. def static getGitVersion() {
  4. try {
  5. return 'git rev-parse --short HEAD'.execute().text.trim()
  6. } catch (Throwable th) {
  7. return "";
  8. }
  9. }
  10. android {
  11. compileSdkVersion 25
  12. buildToolsVersion '25.0.3'
  13. defaultConfig {
  14. applicationId "com.sheishuo.app"
  15. minSdkVersion rootProject.ext.minSdkVersion
  16. targetSdkVersion rootProject.ext.targetSdkVersion
  17. buildConfigField "String", "GIT_REVISION", "\"${getGitVersion()}\""
  18. buildConfigField "String", "BUILD_DATE", "\"${new Date().toLocaleString()}\"";
  19. multiDexEnabled true
  20. versionCode 1
  21. versionName "1.0.0"
  22. ndk {
  23. abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
  24. }
  25. }
  26. signingConfigs {
  27. debug {
  28. storeFile file("debug.keystore")
  29. storePassword 'android'
  30. keyAlias 'androiddebugkey'
  31. keyPassword 'android'
  32. }
  33. release {
  34. storeFile file('sheishuo.keystore')
  35. storePassword 'SheiShuo2017'
  36. keyAlias 'sheishuo'
  37. keyPassword 'SheiShuo2017'
  38. }
  39. }
  40. buildTypes {
  41. debug {
  42. signingConfig signingConfigs.debug
  43. manifestPlaceholders = [AMAP_KEY: "318efe70b54fb682a980706e8680382f"]
  44. }
  45. release {
  46. shrinkResources true
  47. minifyEnabled true
  48. zipAlignEnabled true
  49. proguardFile('proguard.cfg')
  50. signingConfig signingConfigs.release
  51. manifestPlaceholders = [AMAP_KEY: "ee20324fba1c7f4ad7a4a207e7f08e8d"]
  52. }
  53. }
  54. sourceSets {
  55. main {
  56. manifest.srcFile 'AndroidManifest.xml'
  57. java.srcDirs = ['src']
  58. resources.srcDirs = ['src']
  59. aidl.srcDirs = ['src']
  60. renderscript.srcDirs = ['src']
  61. res.srcDirs = ['res', 'res-avchat', 'res-chatroom']
  62. assets.srcDirs = ['assets']
  63. jniLibs.srcDirs = ['libs', 'libs-sdk']
  64. }
  65. }
  66. lintOptions {
  67. checkReleaseBuilds false
  68. abortOnError false
  69. }
  70. dexOptions {
  71. preDexLibraries false
  72. jumboMode true
  73. javaMaxHeapSize "4g"
  74. }
  75. packagingOptions {
  76. exclude 'META-INF/LICENSE.txt'
  77. exclude 'META-INF/NOTICE.txt'
  78. exclude 'META-INF/rxjava.properties'
  79. }
  80. compileOptions {
  81. sourceCompatibility JavaVersion.VERSION_1_7
  82. targetCompatibility JavaVersion.VERSION_1_7
  83. }
  84. }
  85. repositories {
  86. flatDir {
  87. dirs 'aars'
  88. }
  89. }
  90. dependencies {
  91. compile fileTree(include: '*.jar', dir: 'libs')
  92. compile(name: 'HMS-SDK-2.4.0.300', ext: 'aar')
  93. compile project(path: ':uikit')
  94. //RxJava 2 & RxAndroid
  95. //Gson
  96. //Retrofit
  97. //debugCompile project(':plugins:sf')
  98. //CardView
  99. compile files('libs/alipaySdk-20170710.jar')
  100. compile 'com.netease.nimlib:jsbridge:1.3.1'
  101. compile 'com.android.support:multidex:1.0.1'
  102. compile 'com.android.support:support-annotations:25.3.1'
  103. compile 'io.reactivex.rxjava2:rxjava:2.1.1'
  104. compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
  105. compile 'com.google.code.gson:gson:2.8.1'
  106. compile 'com.squareup.retrofit2:retrofit:2.3.0'
  107. compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
  108. compile 'com.squareup.retrofit2:converter-gson:2.3.0'
  109. compile 'com.android.support:cardview-v7:25.1.1'
  110. compile 'com.android.support.constraint:constraint-layout:1.0.2'
  111. compile 'com.tencent.bugly:crashreport:latest.release'
  112. compile 'com.tencent.bugly:nativecrashreport:latest.release'
  113. compile 'com.contrarywind:Android-PickerView:3.2.5'
  114. }