From f71d19d1fdf046d7dd1566fca248cf7f9e114903 Mon Sep 17 00:00:00 2001 From: Tho Nguyen Date: Thu, 6 Jun 2019 16:45:19 +0200 Subject: [PATCH] Handle empty lint xml config properly for unified rule (#855) --- .../okbuck/composer/android/AndroidModuleRuleComposer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/com/uber/okbuck/composer/android/AndroidModuleRuleComposer.java b/buildSrc/src/main/java/com/uber/okbuck/composer/android/AndroidModuleRuleComposer.java index 4fc9a53fc..6e6e10969 100644 --- a/buildSrc/src/main/java/com/uber/okbuck/composer/android/AndroidModuleRuleComposer.java +++ b/buildSrc/src/main/java/com/uber/okbuck/composer/android/AndroidModuleRuleComposer.java @@ -97,9 +97,13 @@ public static Rule compose( .filter(t -> (t instanceof JvmTarget)) .map(BuckRuleComposer::binTargets) .collect(Collectors.toSet()); + + if (lintConfigPath != null) { + unifiedAndroid + .lintConfigXml(fileRule(lintConfigPath)); + } unifiedAndroid - .lintConfigXml(fileRule(lintConfigPath)) .customLints(customLintTargets) .lintOptions(target.getLintOptions()); } else {