From 04a7a28b1e26bbe0788d72a16ae838afdd52ea4d Mon Sep 17 00:00:00 2001 From: Gautam Korlam Date: Thu, 22 Jun 2017 20:15:06 -0700 Subject: [PATCH] Fix rule type propagation --- .../uber/okbuck/composer/java/JavaLibraryRuleComposer.groovy | 1 + .../com/uber/okbuck/composer/java/JavaTestRuleComposer.groovy | 1 + .../groovy/com/uber/okbuck/rule/java/JavaLibraryRule.groovy | 4 ++-- .../main/groovy/com/uber/okbuck/rule/java/JavaTestRule.groovy | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/buildSrc/src/main/groovy/com/uber/okbuck/composer/java/JavaLibraryRuleComposer.groovy b/buildSrc/src/main/groovy/com/uber/okbuck/composer/java/JavaLibraryRuleComposer.groovy index 9cbbbced9..2c12553b0 100644 --- a/buildSrc/src/main/groovy/com/uber/okbuck/composer/java/JavaLibraryRuleComposer.groovy +++ b/buildSrc/src/main/groovy/com/uber/okbuck/composer/java/JavaLibraryRuleComposer.groovy @@ -37,6 +37,7 @@ final class JavaLibraryRuleComposer extends JvmBuckRuleComposer { } new JavaLibraryRule( + ruleType, src(target), ["PUBLIC"], deps, diff --git a/buildSrc/src/main/groovy/com/uber/okbuck/composer/java/JavaTestRuleComposer.groovy b/buildSrc/src/main/groovy/com/uber/okbuck/composer/java/JavaTestRuleComposer.groovy index 489566adc..8e7fa40bd 100644 --- a/buildSrc/src/main/groovy/com/uber/okbuck/composer/java/JavaTestRuleComposer.groovy +++ b/buildSrc/src/main/groovy/com/uber/okbuck/composer/java/JavaTestRuleComposer.groovy @@ -33,6 +33,7 @@ final class JavaTestRuleComposer extends JvmBuckRuleComposer { } new JavaTestRule( + ruleType, test(target), ["PUBLIC"], deps, diff --git a/buildSrc/src/main/groovy/com/uber/okbuck/rule/java/JavaLibraryRule.groovy b/buildSrc/src/main/groovy/com/uber/okbuck/rule/java/JavaLibraryRule.groovy index dfd200691..8e38174a8 100644 --- a/buildSrc/src/main/groovy/com/uber/okbuck/rule/java/JavaLibraryRule.groovy +++ b/buildSrc/src/main/groovy/com/uber/okbuck/rule/java/JavaLibraryRule.groovy @@ -6,6 +6,7 @@ import com.uber.okbuck.core.model.jvm.TestOptions class JavaLibraryRule extends JavaRule { JavaLibraryRule( + RuleType ruleType, String name, List visibility, List deps, @@ -19,8 +20,7 @@ class JavaLibraryRule extends JavaRule { List postprocessClassesCommands, List options, List testTargets, - Set extraOpts, - RuleType ruleType = RuleType.JAVA_LIBRARY) { + Set extraOpts) { super( ruleType, diff --git a/buildSrc/src/main/groovy/com/uber/okbuck/rule/java/JavaTestRule.groovy b/buildSrc/src/main/groovy/com/uber/okbuck/rule/java/JavaTestRule.groovy index c6e105144..7ed8ce46e 100644 --- a/buildSrc/src/main/groovy/com/uber/okbuck/rule/java/JavaTestRule.groovy +++ b/buildSrc/src/main/groovy/com/uber/okbuck/rule/java/JavaTestRule.groovy @@ -8,6 +8,7 @@ class JavaTestRule extends JavaRule { private static final List JAVA_TEST_LABELS = ['unit', 'java'] JavaTestRule( + RuleType ruleType, String name, List visibility, List deps, @@ -22,7 +23,6 @@ class JavaTestRule extends JavaRule { List options, TestOptions testOptions, Set extraOpts, - RuleType ruleType = RuleType.JAVA_TEST, List testLabels = JAVA_TEST_LABELS) { super( ruleType,