build.gradle 3.5 KB

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