From 886d480ba4029f6a253eb354d1b8d8c7a4ee5bcc Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Thu, 17 Jan 2019 10:38:19 -0800 Subject: [PATCH] Log a error if a potential release build is debuggable (#500) Signed-off-by: Alex Saveau --- .../github/triplet/gradle/play/PlayPublisherPlugin.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugin/src/main/kotlin/com/github/triplet/gradle/play/PlayPublisherPlugin.kt b/plugin/src/main/kotlin/com/github/triplet/gradle/play/PlayPublisherPlugin.kt index 282bdfb95..152760fac 100644 --- a/plugin/src/main/kotlin/com/github/triplet/gradle/play/PlayPublisherPlugin.kt +++ b/plugin/src/main/kotlin/com/github/triplet/gradle/play/PlayPublisherPlugin.kt @@ -77,8 +77,16 @@ class PlayPublisherPlugin : Plugin { (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 } @@ -87,7 +95,6 @@ class PlayPublisherPlugin : Plugin { }.singleOrNull().let { it ?: extensionContainer.findByName(buildType.name) }.mergeWith(baseExtension) - val variantName = name.capitalize() if (!isSigningReady && !outputsAreSigned) { project.logger.error(