Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Fix variant name
Browse files Browse the repository at this point in the history
  • Loading branch information
yujincheng08 committed Dec 8, 2021
1 parent cda0096 commit 1e3be68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ android {
}
applicationVariants.all { variant ->
def buildType = variant.name.capitalize()
def variantLowered = variant.name.toLowerCase()
def variantName = variant.name

variant.outputs.all {
outputFileName = "${variant.getFlavorName()}-${variant.versionName}.apk"
}

task "copyDex$buildType"(type: Copy) {
dependsOn("assemble$buildType")
def dexFilePath = "$buildDir/intermediates/dex/${variantLowered}/mergeDex${buildType}/classes.dex"
def dexFilePath = "$buildDir/intermediates/dex/${variantName}/mergeDex${buildType}/classes.dex"
from dexFilePath
rename "classes.dex", "lsp.dex"
into "$rootProject.projectDir/out/dexes"
}

task "copySo$buildType"(type: Copy) {
dependsOn("assemble$buildType")
from "$buildDir/intermediates/merged_native_libs/${variantLowered}/out/lib"
from "$buildDir/intermediates/merged_native_libs/${variantName}/out/lib"
into "$rootProject.projectDir/out/so"
}

Expand Down

0 comments on commit 1e3be68

Please sign in to comment.