conflict fixed
This commit is contained in:
@@ -5,11 +5,11 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace 'com.logitech.vc.kirbytest'
|
||||
compileSdk 32
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.logitech.vc.kirbytest"
|
||||
minSdk 29
|
||||
minSdk 27
|
||||
targetSdk 32
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
@@ -31,6 +31,29 @@ android {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
applicationVariants.all{
|
||||
variant ->
|
||||
variant.outputs.each{
|
||||
output->
|
||||
// on below line we are specifying our app name.
|
||||
project.ext { appName = 'kirbyTestApp' }
|
||||
// on below line we are adding the formatted date to our apk file name.
|
||||
def formattedDate = new Date().format('yyyyMMdd')
|
||||
// on below line we are creating a new name for our apk.
|
||||
def newName = output.outputFile.name
|
||||
// on below line we are replacing our previous name with our app name.
|
||||
newName = newName.replace("app-", "$project.ext.appName-")
|
||||
// 當build type為 debug時觸發
|
||||
// on below line we are replacing -debug with our formatted date.
|
||||
newName = newName.replace("-debug", "-debug-" + formattedDate)
|
||||
// 當build type為 release時觸發
|
||||
// on below line we are replacing -release with our formatted date.
|
||||
newName = newName.replace("-release", "-release-" + formattedDate)
|
||||
// at last we are setting our apk name to it.
|
||||
output.outputFileName = newName
|
||||
}
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
@@ -53,6 +76,7 @@ dependencies {
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.2'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.5.2'
|
||||
implementation 'androidx.activity:activity:1.8.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
|
||||
Reference in New Issue
Block a user