Created
November 1, 2020 12:18
-
-
Save BelooS/97eb37e4d30f7e87775cbaf92fe27e56 to your computer and use it in GitHub Desktop.
Extract mapping gradle task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extractMapping = tasks.create("extractMapping") { | |
description "Copy mapping archive into outputs/artifacts folder." | |
group 'circleci' | |
} | |
android.applicationVariants.all { variant -> | |
if (variant.mappingFile != null) { | |
def copyMapping = tasks.create(name: "copy${variant.name}Mapping", type: Copy) { | |
from variant.mappingFile | |
rename { "${archivesBaseName}-${variant.name}Mapping.txt" } | |
into "${rootProject.buildDir}/circleci/mapping" | |
} | |
extractMapping.dependsOn copyMapping | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment