Skip to content

Commit

Permalink
Merge pull request #222 from intercom/conor/deps-fix
Browse files Browse the repository at this point in the history
Only check the `compile` configuration for dependencies
  • Loading branch information
ronocod authored Nov 16, 2017
2 parents d7fa9fd + bd19d82 commit 00ebf72
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions intercom-plugin/src/android/build-extras-intercom.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ afterEvaluate {
logIfIncorrectCompileSdkVersion()
logIfIncorrectBuildToolsVersion()
configurations
.findAll { isCompileConfig(it) }
.findAll { it.name == "compile" }
.each { logIncompatibleDependencies(it) }
}

Expand Down Expand Up @@ -67,13 +67,6 @@ private void logIfIncorrectBuildToolsVersion() {
}
}

private static boolean isCompileConfig(config) {
// these can be `compile` or `{variant}Compile`
config.name =~ /^[a-z][a-zA-Z]*ompile/ \
&& !(config.name =~ /^test.*Compile/) \
&& !(config.name =~ /^androidTest.*Compile/)
}

private void logIncompatibleDependencies(config) {
config.resolvedConfiguration.resolvedArtifacts.each {
def artifact = it.moduleVersion.id
Expand Down

0 comments on commit 00ebf72

Please sign in to comment.