diff --git a/.gitignore b/.gitignore index d8d00bc..a235e0c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ /captures .externalNativeBuild .cxx + +app/release/ diff --git a/app/build.gradle b/app/build.gradle index 0a39f5e..377283e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,9 @@ apply plugin: 'com.android.application' +def releaseTime() { + return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+8")) +} + android { compileSdkVersion 30 buildToolsVersion "30.0.3" @@ -9,7 +13,7 @@ android { minSdkVersion 16 targetSdkVersion 30 versionCode 1 - versionName "1.0" + versionName "1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -20,6 +24,16 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + + applicationVariants.all { variant -> + variant.outputs.all { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.apk')) { + def fileName = "WXHook_v${defaultConfig.versionName}_${variant.name}_${releaseTime()}.apk" + outputFileName = fileName + } + } + } } dependencies { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 464d628..d9aa0ee 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@ + + -