Class CrappyJavaExtension

java.lang.Object
crappyjava.gradle.CrappyJavaExtension

public class CrappyJavaExtension extends Object
crappyJava { ... } block. Values become the conventions of the crap task.
  • Constructor Details

    • CrappyJavaExtension

      @Inject public CrappyJavaExtension(org.gradle.api.model.ObjectFactory objects)
  • Method Details

    • getThreshold

      public org.gradle.api.provider.Property<Double> getThreshold()
      CRAP score above which a method is crappy. Default 30.
    • setThreshold

      public void setThreshold(Number value)
      Accepts any number so Groovy DSL can write threshold = 10 or threshold = 7.5.
    • getFailOnViolation

      public org.gradle.api.provider.Property<Boolean> getFailOnViolation()
      Fail the build when any method is above the threshold. Default true.
    • getShowAll

      public org.gradle.api.provider.Property<Boolean> getShowAll()
      List every method instead of only crappy ones. Default false.
    • getTop

      public org.gradle.api.provider.Property<Integer> getTop()
      List the n worst methods regardless of threshold; 0 disables. Default 0.