From 5254bcdc5cdfe64f5a1293e8109920cf6b17abcf Mon Sep 17 00:00:00 2001 From: Adam Kobus Date: Fri, 24 Jun 2016 10:58:12 +0200 Subject: [PATCH] ST-134 Fabric is now properly configured for custom build types --- README.md | 2 +- .../android/commands/ConfigureCoverageCommand.groovy | 2 +- .../android/commands/ConfigureFabricCommand.groovy | 12 ++++-------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3ce77d3..f0a1a3f 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ buildscript { } } dependencies { - classpath 'com.infullmobile:toolkit:0.3.10' + classpath 'com.infullmobile:toolkit:0.3.12' } } ``` diff --git a/src/main/groovy/com/infullmobile/toolkit/impl/android/commands/ConfigureCoverageCommand.groovy b/src/main/groovy/com/infullmobile/toolkit/impl/android/commands/ConfigureCoverageCommand.groovy index 34ea3b3..cbca154 100644 --- a/src/main/groovy/com/infullmobile/toolkit/impl/android/commands/ConfigureCoverageCommand.groovy +++ b/src/main/groovy/com/infullmobile/toolkit/impl/android/commands/ConfigureCoverageCommand.groovy @@ -18,7 +18,7 @@ class ConfigureCoverageCommand extends IConfigCommand { @Override void performCommand(IProjectConfigurator configurator) { - configuredProject.android.buildTypes.each() { buildType -> + configuredProject.android.buildTypes.all() { buildType -> buildType.testCoverageEnabled = true } if(!PluginsUtils.hasJacocoPlugin(configuredProject)) { diff --git a/src/main/groovy/com/infullmobile/toolkit/impl/android/commands/ConfigureFabricCommand.groovy b/src/main/groovy/com/infullmobile/toolkit/impl/android/commands/ConfigureFabricCommand.groovy index 37364ef..2c9448a 100644 --- a/src/main/groovy/com/infullmobile/toolkit/impl/android/commands/ConfigureFabricCommand.groovy +++ b/src/main/groovy/com/infullmobile/toolkit/impl/android/commands/ConfigureFabricCommand.groovy @@ -21,8 +21,8 @@ class ConfigureFabricCommand extends IConfigCommand { if (!PluginsUtils.hasFabricPlugin(configuredProject)) { return; } - configuredProject.android.buildTypes.each { buildType -> - def team = getChosenFabricTeam(); + configuredProject.android.buildTypes.all { buildType -> + def String team = getChosenFabricTeam(); if (team) { buildType.ext.betaDistributionGroupAliases = team } @@ -34,14 +34,10 @@ class ConfigureFabricCommand extends IConfigCommand { } def getChosenFabricTeam() { - def team = configuredProject.hasProperty('fabricTeam') ? configuredProject.fabricTeam : config.defaultFabricTeam - println ">> Fabric team is set to $team on project ${configuredProject.name}" - return team + return configuredProject.hasProperty('fabricTeam') ? configuredProject.fabricTeam : config.defaultFabricTeam } def getChangelogPath() { - def path = configuredProject.hasProperty('fabricChangelogPath') ? configuredProject.fabricChangelogPath : null - println ">> Changelog path is set to $path in project ${configuredProject.name}" - return path + return configuredProject.hasProperty('fabricChangelogPath') ? configuredProject.fabricChangelogPath : null } }