|
|
@ -39,8 +39,6 @@ import org.gradle.kotlin.dsl.assign
|
|
|
|
import org.gradle.kotlin.dsl.register
|
|
|
|
import org.gradle.kotlin.dsl.register
|
|
|
|
import org.gradle.language.base.plugins.LifecycleBasePlugin
|
|
|
|
import org.gradle.language.base.plugins.LifecycleBasePlugin
|
|
|
|
import org.gradle.process.ExecOperations
|
|
|
|
import org.gradle.process.ExecOperations
|
|
|
|
import java.io.File
|
|
|
|
|
|
|
|
import java.util.Locale
|
|
|
|
|
|
|
|
import javax.inject.Inject
|
|
|
|
import javax.inject.Inject
|
|
|
|
|
|
|
|
|
|
|
|
@CacheableTask
|
|
|
|
@CacheableTask
|
|
|
@ -123,15 +121,17 @@ fun Project.configureBadgingTasks(
|
|
|
|
val generateBadging =
|
|
|
|
val generateBadging =
|
|
|
|
tasks.register<GenerateBadgingTask>(generateBadgingTaskName) {
|
|
|
|
tasks.register<GenerateBadgingTask>(generateBadgingTaskName) {
|
|
|
|
apk = variant.artifacts.get(SingleArtifact.APK_FROM_BUNDLE)
|
|
|
|
apk = variant.artifacts.get(SingleArtifact.APK_FROM_BUNDLE)
|
|
|
|
|
|
|
|
aapt2Executable.set(
|
|
|
|
aapt2Executable = File(
|
|
|
|
// TODO: Replace with `sdkComponents.aapt2` when it's available in AGP
|
|
|
|
baseExtension.sdkDirectory,
|
|
|
|
// https://issuetracker.google.com/issues/376815836
|
|
|
|
"${SdkConstants.FD_BUILD_TOOLS}/" +
|
|
|
|
componentsExtension.sdkComponents.sdkDirectory.map { directory ->
|
|
|
|
"${baseExtension.buildToolsVersion}/" +
|
|
|
|
directory.file(
|
|
|
|
SdkConstants.FN_AAPT2,
|
|
|
|
"${SdkConstants.FD_BUILD_TOOLS}/" +
|
|
|
|
|
|
|
|
"${baseExtension.buildToolsVersion}/" +
|
|
|
|
|
|
|
|
SdkConstants.FN_AAPT2,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
badging = project.layout.buildDirectory.file(
|
|
|
|
badging = project.layout.buildDirectory.file(
|
|
|
|
"outputs/apk_from_bundle/${variant.name}/${variant.name}-badging.txt",
|
|
|
|
"outputs/apk_from_bundle/${variant.name}/${variant.name}-badging.txt",
|
|
|
|
)
|
|
|
|
)
|
|
|
|