apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "30.0.0" defaultConfig { applicationId "com.tcl.ah.tvcontrol" minSdkVersion 21 targetSdkVersion 29 versionCode 17 versionName "1.1.7" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } signingConfigs { config { keyAlias 'androiddebugkey' keyPassword 'android' storeFile file("$rootDir/838P.keystore") storePassword 'android' } } buildTypes { release { minifyEnabled false zipAlignEnabled false // 移除无用的resource文件 shrinkResources false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.config } debug { signingConfig signingConfigs.config } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } applicationVariants.all { variant -> variant.outputs.all { //delete 'build/outputs/aar/' // 输出apk名称为 def buildName = 'TvRemoteControl-' if (outputFileName != null && outputFileName.endsWith("-release-unsigned.apk")) { outputFileName = buildName + "-${defaultConfig.versionName}-${defaultConfig.versionCode}-unsigned.apk" } else if (outputFileName != null && outputFileName.endsWith("release.apk")) { outputFileName = buildName + "-${defaultConfig.versionName}-${defaultConfig.versionCode}.apk" } else if (outputFileName != null && outputFileName.endsWith("debug.apk")) { outputFileName = buildName + "-debug.apk" } } } } dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' // implementation 'com.android.support:support-v4:28.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'io.reactivex.rxjava2:rxjava:2.2.19' implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' //1.1.0==>1.2.5 implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5' implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1' implementation(name: 'snack-1.0.2', ext: 'aar') implementation(name: 'hotel-provider-0.2.1', ext: 'aar') implementation project(path: ':configinfo') } configurations.all { resolutionStrategy { force 'androidx.core:core:1.6.0' force 'androidx.core:core-ktx:1.6.0' } }