build.gradle 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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.shuishuo.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 2
  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. // storeFile file('sheishuo.keystore')
  33. // storePassword 'SheiShuo2017'
  34. // keyAlias 'sheishuo'
  35. // keyPassword 'SheiShuo2017'
  36. }
  37. release {
  38. storeFile file('sheishuo.keystore')
  39. storePassword 'SheiShuo2017'
  40. keyAlias 'sheishuo'
  41. keyPassword 'SheiShuo2017'
  42. }
  43. }
  44. buildTypes {
  45. debug {
  46. signingConfig signingConfigs.debug
  47. manifestPlaceholders = [AMAP_KEY: "318efe70b54fb682a980706e8680382f"]
  48. }
  49. release {
  50. shrinkResources true
  51. minifyEnabled true
  52. zipAlignEnabled true
  53. proguardFile('proguard.cfg')
  54. signingConfig signingConfigs.release
  55. manifestPlaceholders = [AMAP_KEY: "ee20324fba1c7f4ad7a4a207e7f08e8d"]
  56. }
  57. }
  58. sourceSets {
  59. main {
  60. manifest.srcFile 'AndroidManifest.xml'
  61. java.srcDirs = ['src']
  62. resources.srcDirs = ['src']
  63. aidl.srcDirs = ['src']
  64. renderscript.srcDirs = ['src']
  65. res.srcDirs = ['res', 'res-avchat', 'res-chatroom']
  66. assets.srcDirs = ['assets']
  67. jniLibs.srcDirs = ['libs', 'libs-sdk']
  68. }
  69. }
  70. lintOptions {
  71. checkReleaseBuilds false
  72. abortOnError false
  73. }
  74. dexOptions {
  75. preDexLibraries false
  76. jumboMode true
  77. javaMaxHeapSize "4g"
  78. }
  79. packagingOptions {
  80. exclude 'META-INF/LICENSE.txt'
  81. exclude 'META-INF/NOTICE.txt'
  82. exclude 'META-INF/rxjava.properties'
  83. }
  84. compileOptions {
  85. sourceCompatibility JavaVersion.VERSION_1_7
  86. targetCompatibility JavaVersion.VERSION_1_7
  87. }
  88. }
  89. repositories {
  90. flatDir {
  91. dirs 'aars'
  92. }
  93. }
  94. dependencies {
  95. compile fileTree(include: '*.jar', dir: 'libs')
  96. compile(name: 'HMS-SDK-2.4.0.300', ext: 'aar')
  97. compile project(path: ':uikit')
  98. //RxJava 2 & RxAndroid
  99. //Gson
  100. //Retrofit
  101. //debugCompile project(':plugins:sf')
  102. //CardView
  103. compile files('libs/alipaySdk-20170710.jar')
  104. compile 'com.netease.nimlib:jsbridge:1.3.1'
  105. compile 'com.android.support:multidex:1.0.1'
  106. compile 'com.android.support:support-annotations:25.3.1'
  107. compile 'io.reactivex.rxjava2:rxjava:2.1.1'
  108. compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
  109. compile 'com.google.code.gson:gson:2.8.1'
  110. compile 'com.squareup.retrofit2:retrofit:2.3.0'
  111. compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
  112. compile 'com.squareup.retrofit2:converter-gson:2.3.0'
  113. compile 'com.android.support:cardview-v7:25.1.1'
  114. compile 'com.android.support.constraint:constraint-layout:1.0.2'
  115. compile 'com.tencent.bugly:crashreport:latest.release'
  116. compile 'com.tencent.bugly:nativecrashreport:latest.release'
  117. compile 'com.contrarywind:Android-PickerView:3.2.5'
  118. }