Skip to content

Commit

Permalink
chore: rename build output
Browse files Browse the repository at this point in the history
  • Loading branch information
Mufanc committed Feb 19, 2024
1 parent 0f5b2c2 commit 7d7460d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,25 @@ android {
}
}

afterEvaluate {
android.applicationVariants.forEach { variant ->
variant.assembleProvider.get().doLast {
for (output in variant.outputs) {
val outputFile = output.outputFile

if (outputFile.relativeTo(projectDir).startsWith("build/intermediates")) {
continue
}

val targetName = "AppLock-v${variant.versionName}-${variant.name}.apk"
val targetFile = File(outputFile.parentFile, targetName)

outputFile.renameTo(targetFile)
}
}
}
}

materialThemeBuilder {
packageName = android.namespace

Expand Down

0 comments on commit 7d7460d

Please sign in to comment.