Commit 7215066e by pye52

适配最新的as

parent 187f70b7
......@@ -85,14 +85,9 @@ android {
targetCompatibility = 1.8
}
// 命名生成的apk
applicationVariants.all { variant ->
if (variant.buildType.name != "debug") {
variant.getVariantData()
.getPublicVariantPropertiesApi()
.getOutputs()
.forEach { output ->
output.apkData.outputFileName = "SmartCanteen" + "_v" + variant.versionName + ".apk"
}
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
outputFileName = "SmartCanteen" + "_v" + variant.versionName + ".apk"
}
}
lintOptions {
......@@ -111,14 +106,14 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
def work_version = "2.4.0"
implementation "androidx.work:work-runtime:$work_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation "org.java-websocket:Java-WebSocket:1.5.1"
implementation 'com.blankj:utilcodex:1.29.0'
def okhttp_version = "4.7.2"
def okhttp_version = "4.9.0"
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
def retrofit_version = '2.9.0'
......
......@@ -9,7 +9,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:4.1.0'
}
}
......
......@@ -51,18 +51,15 @@ android {
targetCompatibility = 1.8
}
// daemon输出到app模块的assets目录中
applicationVariants.all { variant ->
android.applicationVariants.all { variant ->
if (variant.buildType.name != "debug") {
String targetDir = findAppAssetsDir()
if (!targetDir.isEmpty()) {
variant.getPackageApplication()
.outputDirectory = new File(targetDir)
}
variant.getVariantData()
.getPublicVariantPropertiesApi()
.getOutputs()
.forEach { output ->
output.apkData.outputFileName = signed
variant.outputs.all { output ->
outputFileName = signed
}
}
}
......@@ -76,7 +73,7 @@ tasks.whenTaskAdded { task ->
if (targetDir.isEmpty()) {
return
}
File outputJsonFile = new File(targetDir, "output.json")
File outputJsonFile = new File(targetDir, "output-metadata.json")
if (outputJsonFile.exists()) {
outputJsonFile.delete()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment