Class: Buildr::IntellijIdea::IdeaModule
Overview
IdeaModule represents an .iml file
Constant Summary
collapse
- DEFAULT_TYPE =
"JAVA_MODULE"
- DEFAULT_LOCAL_REPOSITORY_ENV_OVERRIDE =
"MAVEN_REPOSITORY"
Constants inherited
from IdeaFile
Buildr::IntellijIdea::IdeaFile::DEFAULT_SUFFIX
Instance Attribute Summary collapse
Attributes inherited from IdeaFile
#buildr_project, #id, #suffix, #template
Instance Method Summary
collapse
Methods inherited from IdeaFile
#add_component, #filename, #write
Constructor Details
Returns a new instance of IdeaModule.
Instance Attribute Details
Returns the value of attribute facets.
115
116
117
|
# File 'lib/buildr/ide/idea.rb', line 115
def facets
@facets
end
|
Returns the value of attribute group.
114
115
116
|
# File 'lib/buildr/ide/idea.rb', line 114
def group
@group
end
|
#local_repository_env_override ⇒ Object
Returns the value of attribute local_repository_env_override.
113
114
115
|
# File 'lib/buildr/ide/idea.rb', line 113
def local_repository_env_override
@local_repository_env_override
end
|
#main_output_dir ⇒ Object
159
160
161
|
# File 'lib/buildr/ide/idea.rb', line 159
def main_output_dir
@main_output_dir ||= buildr_project._(:target, :main, :java)
end
|
#test_output_dir ⇒ Object
165
166
167
|
# File 'lib/buildr/ide/idea.rb', line 165
def test_output_dir
@test_output_dir ||= buildr_project._(:target, :test, :java)
end
|
Returns the value of attribute type.
112
113
114
|
# File 'lib/buildr/ide/idea.rb', line 112
def type
@type
end
|
Instance Method Details
#add_facet(name, type) ⇒ Object
177
178
179
180
181
182
183
|
# File 'lib/buildr/ide/idea.rb', line 177
def add_facet(name, type)
target = StringIO.new
Builder::XmlMarkup.new(:target => target, :indent => 2).facet(:name => name, :type => type) do |xml|
yield xml if block_given?
end
self.facets << REXML::Document.new(target.string).root
end
|
#buildr_project=(buildr_project) ⇒ Object
122
123
124
125
126
127
|
# File 'lib/buildr/ide/idea.rb', line 122
def buildr_project=(buildr_project)
@id = nil
@facets = []
@skip_content = false
@buildr_project = buildr_project
end
|
#excluded_directories ⇒ Object
147
148
149
150
151
152
153
154
155
|
# File 'lib/buildr/ide/idea.rb', line 147
def excluded_directories
@excluded_directories ||= [
buildr_project.resources.target,
buildr_project.test.resources.target,
buildr_project.path_to(:target, :main),
buildr_project.path_to(:target, :test),
buildr_project.path_to(:reports)
].flatten.compact
end
|
#extension ⇒ Object
129
130
131
|
# File 'lib/buildr/ide/idea.rb', line 129
def extension
"iml"
end
|
#main_dependencies ⇒ Object
169
170
171
|
# File 'lib/buildr/ide/idea.rb', line 169
def main_dependencies
@main_dependencies ||= buildr_project.compile.dependencies
end
|
#main_source_directories ⇒ Object
133
134
135
136
137
138
|
# File 'lib/buildr/ide/idea.rb', line 133
def main_source_directories
@main_source_directories ||= [
buildr_project.compile.sources,
buildr_project.resources.sources
].flatten.compact
end
|
#skip_content! ⇒ Object
189
190
191
|
# File 'lib/buildr/ide/idea.rb', line 189
def skip_content!
@skip_content = true
end
|
#skip_content? ⇒ Boolean
185
186
187
|
# File 'lib/buildr/ide/idea.rb', line 185
def skip_content?
!!@skip_content
end
|
#test_dependencies ⇒ Object
173
174
175
|
# File 'lib/buildr/ide/idea.rb', line 173
def test_dependencies
@test_dependencies ||= buildr_project.test.compile.dependencies
end
|
#test_source_directories ⇒ Object
140
141
142
143
144
145
|
# File 'lib/buildr/ide/idea.rb', line 140
def test_source_directories
@test_source_directories ||= [
buildr_project.test.compile.sources,
buildr_project.test.resources.sources
].flatten.compact
end
|