Skip to content

Commit

Permalink
Log a error if a potential release build is debuggable (#500)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX authored and bhurling committed Jan 17, 2019
1 parent 142963c commit 886d480
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,16 @@ class PlayPublisherPlugin : Plugin<Project> {
(android as ExtensionAware).extensions.add(PLAY_CONFIGS_PATH, extensionContainer)
BootstrapOptionsHolder.reset()
android.applicationVariants.whenObjectAdded {
val variantName = name.capitalize()

if (buildType.isDebuggable) {
project.logger.info("Skipping debuggable build type ${buildType.name}.")
val typeName = buildType.name
if (typeName.equals("release", true)) {
project.logger.error(
"GPP cannot configure $variantName because it is debuggable")
} else {
project.logger.info("Skipping debuggable build with type '$typeName'")
}
return@whenObjectAdded
}

Expand All @@ -87,7 +95,6 @@ class PlayPublisherPlugin : Plugin<Project> {
}.singleOrNull().let {
it ?: extensionContainer.findByName(buildType.name)
}.mergeWith(baseExtension)
val variantName = name.capitalize()

if (!isSigningReady && !outputsAreSigned) {
project.logger.error(
Expand Down

0 comments on commit 886d480

Please sign in to comment.