build.gradle 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. apply plugin: 'com.android.application'
  2. apply from: '../config/sign.gradle'
  3. android {
  4. signingConfigs {
  5. if (propertyHaveSigningConfigs) {
  6. config {
  7. keyAlias propertyKeyAliasStr
  8. keyPassword propertyKeyPwdStr
  9. storeFile file(propertyStoreFileStr)
  10. storePassword propertyStorePwdStr
  11. }
  12. }
  13. }
  14. compileSdkVersion 29
  15. buildToolsVersion "29.0.3"
  16. defaultConfig {
  17. applicationId "com.tcl.customerapi"
  18. minSdkVersion 29
  19. targetSdkVersion 29
  20. versionCode 1108
  21. versionName "1.1.08"
  22. multiDexEnabled true
  23. }
  24. buildTypes {
  25. release {
  26. minifyEnabled false
  27. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  28. signingConfig signingConfigs.config
  29. debuggable false
  30. }
  31. debug {
  32. signingConfig signingConfigs.config
  33. }
  34. }
  35. compileOptions {
  36. sourceCompatibility JavaVersion.VERSION_1_8
  37. targetCompatibility JavaVersion.VERSION_1_8
  38. }
  39. lintOptions {
  40. abortOnError false
  41. }
  42. applicationVariants.all { variant ->
  43. variant.outputs.all {
  44. //delete 'build/outputs/aar/'
  45. // 输出apk名称为
  46. def buildName = 'HotelApi'
  47. if (outputFileName != null && outputFileName.endsWith("-release-unsigned.apk")) {
  48. outputFileName = buildName + "-${defaultConfig.versionName}-release-unsigned.apk"
  49. } else if (outputFileName != null && outputFileName.endsWith("release.apk")) {
  50. outputFileName = buildName + "-${defaultConfig.versionName}.apk"
  51. } else if (outputFileName != null && outputFileName.endsWith("debug.apk")) {
  52. outputFileName = buildName + "-${defaultConfig.versionName}-debug.apk"
  53. }
  54. }
  55. }
  56. }
  57. dependencies {
  58. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  59. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  60. implementation(name: 'appassistsdk-2.0.11', ext: 'aar')
  61. implementation(name: 'snack-1.0.2', ext: 'aar')
  62. implementation(name: 'ah-extension-1.0.1', ext: 'aar')
  63. testImplementation 'com.alibaba:fastjson:1.2.61'
  64. implementation 'com.alibaba:fastjson:1.1.71.android'
  65. implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
  66. implementation 'com.fasterxml.jackson.core:jackson-core:2.9.8'
  67. implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.8'
  68. implementation 'io.reactivex.rxjava2:rxjava:2.2.5'
  69. implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
  70. implementation 'com.squareup.retrofit2:retrofit:2.5.0'
  71. implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'
  72. implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
  73. implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
  74. implementation 'com.squareup.okhttp3:okhttp:4.2.2'
  75. implementation 'com.google.code.gson:gson:2.8.5'
  76. implementation 'androidx.multidex:multidex:2.0.1'
  77. implementation 'org.apache.httpcomponents:httpcore:4.4.4'
  78. compileOnly files('mylibs/com.tcl.seeker.jar')
  79. compileOnly files('mylibs/tvmanager.jar')
  80. compileOnly files('mylibs/framework.jar')
  81. compileOnly files('mylibs/com.tcl.tvos.addon.jar')
  82. implementation files('mylibs/android.tclwidget.jar')
  83. implementation files('libs/QRZxing-core-2.2.jar')
  84. implementation files('libs/jdom.jar')
  85. implementation files('libs/sqlitecommon.jar')
  86. implementation files('libs/com.broadcom.bt.jar')
  87. implementation files('mylibs/vendor.tcl.gpio-V1.0-java.jar')
  88. }
  89. def getLayoutLibPath() {
  90. def versionPath = "android-25"
  91. return "${android.getSdkDirectory().getAbsolutePath()}" + "/platforms/" + versionPath + "/data/layoutlib.jar"
  92. }