Sha256: 571871bf134d98b6cb9f44bb8b8d08f1b147e104e32964c0ce2d50675799ffd6

Contents?: true

Size: 1.17 KB

Versions: 11

Compression:

Stored size: 1.17 KB

Contents

module Buildr

  # Addes the <code>jdepend:swing</code>, <code>jdepend:text</code> and <code>jdepend:xml</code> tasks.
  # Require explicitly using <code>require "buildr/jdepend"</code>.
  module Jdepend

    REQUIRES = ["jdepend:jdepend:jar:2.9.1"]

    class << self

      def requires()
        @requires ||= Buildr.artifacts(REQUIRES).each(&:invoke).map(&:to_s)
      end

      def paths()
        Project.projects.map(&:compile).each(&:invoke).map(&:target).map(&:to_s).select { |path| File.exist?(path) }
      end

    end

    namespace "jdepend" do

      desc "Runs JDepend on all your projects (Swing UI)"
      task "swing" do
        Buildr.java "jdepend.swingui.JDepend", paths, :classpath=>requires, :name=>"JDepend"
      end

      desc "Runs JDepend on all your projects (Text UI)"
      task "text" do
        Buildr.java "jdepend.textui.JDepend", paths, :classpath=>requires, :name=>"JDepend"
      end

      desc "Runs JDepend on all your projects (XML output to jdepend.xml)"
      task "xml" do
        Buildr.java "jdepend.xmlui.JDepend", "-file", "jdepend.xml", paths, :classpath=>requires, :name=>"JDepend"
        puts "Created jdepend.xml"
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
buildr-1.2.0 lib/buildr/jdepend.rb
buildr-1.2.1 lib/buildr/jdepend.rb
buildr-1.2.10 lib/buildr/jdepend.rb
buildr-1.2.2 lib/buildr/jdepend.rb
buildr-1.2.3 lib/buildr/jdepend.rb
buildr-1.2.4 lib/buildr/jdepend.rb
buildr-1.2.5 lib/buildr/jdepend.rb
buildr-1.2.6 lib/buildr/jdepend.rb
buildr-1.2.7 lib/buildr/jdepend.rb
buildr-1.2.8 lib/buildr/jdepend.rb
buildr-1.2.9 lib/buildr/jdepend.rb