build.gradle 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. apply plugin: 'com.android.application'
  2. android {
  3. compileSdkVersion 29
  4. buildToolsVersion "30.0.0"
  5. defaultConfig {
  6. applicationId "com.tcl.ah.tvcontrol"
  7. minSdkVersion 21
  8. targetSdkVersion 29
  9. versionCode 17
  10. versionName "1.1.7"
  11. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  12. }
  13. signingConfigs {
  14. config {
  15. keyAlias 'androiddebugkey'
  16. keyPassword 'android'
  17. storeFile file("$rootDir/838P.keystore")
  18. storePassword 'android'
  19. }
  20. }
  21. buildTypes {
  22. release {
  23. minifyEnabled false
  24. zipAlignEnabled false
  25. // 移除无用的resource文件
  26. shrinkResources false
  27. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  28. signingConfig signingConfigs.config
  29. }
  30. debug {
  31. signingConfig signingConfigs.config
  32. }
  33. }
  34. compileOptions {
  35. sourceCompatibility JavaVersion.VERSION_1_8
  36. targetCompatibility JavaVersion.VERSION_1_8
  37. }
  38. applicationVariants.all { variant ->
  39. variant.outputs.all {
  40. //delete 'build/outputs/aar/'
  41. // 输出apk名称为
  42. def buildName = 'TvRemoteControl-'
  43. if (outputFileName != null && outputFileName.endsWith("-release-unsigned.apk")) {
  44. outputFileName = buildName + "-${defaultConfig.versionName}-${defaultConfig.versionCode}-unsigned.apk"
  45. } else if (outputFileName != null && outputFileName.endsWith("release.apk")) {
  46. outputFileName = buildName + "-${defaultConfig.versionName}-${defaultConfig.versionCode}.apk"
  47. } else if (outputFileName != null && outputFileName.endsWith("debug.apk")) {
  48. outputFileName = buildName + "-debug.apk"
  49. }
  50. }
  51. }
  52. }
  53. dependencies {
  54. implementation fileTree(dir: "libs", include: ["*.jar"])
  55. implementation 'androidx.appcompat:appcompat:1.2.0'
  56. implementation 'androidx.constraintlayout:constraintlayout:2.0.3'
  57. testImplementation 'junit:junit:4.12'
  58. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  59. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  60. // implementation 'com.android.support:support-v4:28.0.0'
  61. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  62. implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
  63. implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
  64. //1.1.0==>1.2.5
  65. implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
  66. implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
  67. implementation(name: 'snack-1.0.2', ext: 'aar')
  68. implementation(name: 'hotel-provider-0.2.1', ext: 'aar')
  69. implementation project(path: ':configinfo')
  70. }
  71. configurations.all {
  72. resolutionStrategy {
  73. force 'androidx.core:core:1.6.0'
  74. force 'androidx.core:core-ktx:1.6.0'
  75. }
  76. }