Skip to content

0.2.0 - SVG, simple names and improved gradle plugin

Choose a tag to compare

@arunkumar9t2 arunkumar9t2 released this 01 Mar 06:43

New

  • Scabbard now supports SVG output format. SVG helps in reducing file sizes and supports mild interactivity. For example, you could click on a subcomponent to navigate to it's sub graph as shown here when opened in a browser. Navigation is considered a beta and needs more work for multi-module projects.
    • SVG can be enabled by
      scabbard {
          enabled true
          outputFormat "svg" // default png
      }
    • All examples are updated with svgs and are interactive.
  • Support for simple names. All graphs now use simple names instead of qualified names by default.
    • To continue using qualified names:
      scabbard {
          enabled true
          qualifiedNames true // default false
      }
  • When full binding graph validation is used, full binding graph images are generated seperated and prefixed with full_.
  • Generated images will have flat dir structure in StandardLocation.CLASS_OUTPUT.
    • Java : build/classes/java/$sourceSet/scabbard
    • Kotlin : build/tmp/kapt3/classes/$sourceSet/scabbard

IntelliJ plugin

  • Gutter icons for @ContributesAndroidInjector. Previously when dagger.Android was used, one has to manually navigate to the generated subcomponent to view the graph. Now it is possible to directly open the generated subcomponents' graph with this new icon.
  • Intellij plugins now recognize full binding graph validation images. i.e images prefixed with full_.

Gradle plugin

  • [Breaking] Better support for Kotlin buildscripts. Previously the syntax for Kotlin scripts used to be unpleasant with closures. Now that has been refactored to below.
    • New syntax
      scabbard { // this : ScabbardPluginExtension 
          enabled = true
          failOnError = false
          outputFormat = "svg"
      }
    • Diff
      - scabbard.configure(closureOf<ScabbardSpec> {
      + scabbard { // this : ScabbardPluginExtension 
          enabled = true
          failOnError = false
      + }
      - })
  • Simple multi module project setup. When Scabbard plugin is applied to a root build.gradle, it automatically configures all subprojects.
  • Plugin no longer relies on order of applied plugins (i.e after Java, Kotlin) to function properly.

Misc

  • Add Dagger coffee app with thermosiphon to examples ☕.
    • Image
  • Remove red color from scope colors and use red only for Missing Binding.
  • Multibindings don't have repeated SET or MAP labels. Now it is only Set|Map<Type>.
  • Fixed subcomponent creator to -> subcomponent edge labels were often getting overlapped.
  • Fixed when both failOnError and fullBindingGraphValidation are used, build fails with FilerException.
  • Fixed build fails with kapt not found for java projects.
  • Scabbard now always generates .dot file even if image generation fails for any reason. (OOM etc.)