Module: Buildr::Emma
- Defined in:
- lib/buildr/java/emma.rb
Overview
Provides the emma:html and emma:xml tasks. Require explicitly using require "buildr/emma".
You can generate emma reports for a single project using the project name as prefix:
project_name:emma:html
You can also specify which classes to include/exclude from instrumentation by passing a class name regexp to the emma.include or emma.exclude methods.
define 'someModule' do
emma.include 'some.package.*'
emma.exclude 'some.foo.util.SimpleUtil'
end
Defined Under Namespace
Modules: EmmaExtension
Classes: EmmaConfig
Constant Summary
collapse
- VERSION =
'2.0.5312'
Class Method Summary
collapse
Class Method Details
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/buildr/java/emma.rb', line 60
def ant
Buildr.ant 'emma' do |ant|
ant.taskdef :resource=>'emma_ant.properties',
:classpath=>Buildr.artifacts(dependencies).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
ant.emma :verbosity=>(Buildr.application.options.trace ? 'verbose' : 'warning') do
yield ant
end
end
end
|
.data_file ⇒ Object
56
57
58
|
# File 'lib/buildr/java/emma.rb', line 56
def data_file()
File.join(report_to, 'coverage.es')
end
|
.dependencies ⇒ Object
48
49
50
|
# File 'lib/buildr/java/emma.rb', line 48
def dependencies
@dependencies ||= ["emma:emma_ant:jar:#{version}", "emma:emma:jar:#{version}"]
end
|
.report_to(format = nil) ⇒ Object
52
53
54
|
# File 'lib/buildr/java/emma.rb', line 52
def report_to format=nil
File.expand_path('reports/emma')
end
|
44
45
46
|
# File 'lib/buildr/java/emma.rb', line 44
def version
Buildr.settings.build['emma'] || VERSION
end
|