3.5日 再提交一次备份
This commit is contained in:
79
jhs/build.gradle
Normal file
79
jhs/build.gradle
Normal file
@@ -0,0 +1,79 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion "30.0.3"
|
||||
defaultConfig {
|
||||
applicationId "com.xyz.jhs"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 31
|
||||
versionCode rootProject.ext.versionCode
|
||||
versionName rootProject.ext.versionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file('justlet.jks')
|
||||
storePassword "123456"
|
||||
keyAlias 'key0'
|
||||
keyPassword "123456"
|
||||
}
|
||||
release {
|
||||
storeFile file('justlet.jks')
|
||||
storePassword "123456"
|
||||
keyAlias 'key0'
|
||||
keyPassword "123456"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all {
|
||||
// def appName = "meemee99"
|
||||
def appName = "1xauddgdskgjhggfddhgfdf"
|
||||
|
||||
def outputDir = new File(rootProject.ext.outputPath)
|
||||
// 创建输出目录
|
||||
outputDir.mkdirs()
|
||||
def outputFileName = "${appName}.apk"
|
||||
// 设置输出文件名
|
||||
setOutputFileName(outputFileName)
|
||||
// 计算新的输出文件
|
||||
def newOutputFile = new File(outputDir, outputFileName)
|
||||
// 如果新的输出目录不存在,则创建它
|
||||
newOutputFile.parentFile.mkdirs()
|
||||
// 在构建完成后将 APK 复制到新位置
|
||||
variant.assemble.doLast {
|
||||
try {
|
||||
java.nio.file.Files.copy(
|
||||
outputFile.toPath(),
|
||||
newOutputFile.toPath(),
|
||||
java.nio.file.StandardCopyOption.REPLACE_EXISTING
|
||||
)
|
||||
println "Success to copy APK !!!"
|
||||
} catch (java.io.IOException e) {
|
||||
println "Failed to copy APK: ${e.message}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(path: ':base_player')
|
||||
}
|
||||
Reference in New Issue
Block a user