buildr 1.5.0-x86-mswin32 → 1.5.1-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +24 -1
  3. data/addon/buildr/bnd.rb +7 -5
  4. data/addon/buildr/custom_pom.rb +3 -272
  5. data/addon/buildr/git_auto_version.rb +3 -1
  6. data/addon/buildr/gwt.rb +66 -7
  7. data/addon/buildr/protobuf.rb +5 -8
  8. data/buildr.gemspec +2 -3
  9. data/doc/contributing.textile +3 -20
  10. data/doc/download.textile +6 -6
  11. data/doc/index.textile +7 -0
  12. data/doc/settings_profiles.textile +1 -1
  13. data/lib/buildr.rb +1 -1
  14. data/lib/buildr/core/build.rb +1 -1
  15. data/lib/buildr/core/filter.rb +1 -1
  16. data/lib/buildr/core/project.rb +1 -1
  17. data/lib/buildr/core/transports.rb +1 -1
  18. data/lib/buildr/ide/idea.rb +18 -3
  19. data/lib/buildr/java/custom_pom.rb +265 -0
  20. data/lib/buildr/java/ecj.rb +2 -2
  21. data/lib/buildr/java/jruby.rb +3 -3
  22. data/lib/buildr/java/packaging.rb +6 -4
  23. data/lib/buildr/java/rjb.rb +5 -5
  24. data/lib/buildr/packaging/archive.rb +3 -3
  25. data/lib/buildr/packaging/artifact.rb +30 -24
  26. data/lib/buildr/packaging/package.rb +2 -1
  27. data/lib/buildr/packaging/zip.rb +2 -2
  28. data/lib/buildr/scala/bdd.rb +21 -21
  29. data/lib/buildr/scala/compiler.rb +21 -18
  30. data/lib/buildr/scala/tests.rb +1 -1
  31. data/lib/buildr/version.rb +1 -1
  32. data/rakelib/release.rake +5 -3
  33. data/rakelib/stage.rake +1 -1
  34. data/spec/addon/jaxb_xjc_spec.rb +0 -1
  35. data/spec/core/application_spec.rb +1 -1
  36. data/spec/core/common_spec.rb +1 -1
  37. data/spec/core/project_spec.rb +3 -3
  38. data/spec/core/test_spec.rb +1 -1
  39. data/spec/core/transport_spec.rb +10 -2
  40. data/spec/{addon → java}/custom_pom_spec.rb +3 -16
  41. data/spec/java/ecj_spec.rb +2 -2
  42. data/spec/java/java_spec.rb +1 -1
  43. data/spec/java/tests_spec.rb +1 -1
  44. data/spec/packaging/artifact_spec.rb +23 -15
  45. data/spec/packaging/packaging_spec.rb +10 -2
  46. data/spec/scala/bdd_spec.rb +0 -1
  47. data/spec/scala/compiler_spec.rb +4 -4
  48. data/spec/scala/doc_spec.rb +0 -1
  49. data/spec/scala/tests_spec.rb +2 -3
  50. metadata +18 -36
  51. data/lib/buildr/scala/org/apache/buildr/Specs2Runner.java +0 -37
  52. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.class +0 -0
  53. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.java +0 -57
  54. data/lib/buildr/scala/org/apache/buildr/ZincRunner.class +0 -0
  55. data/lib/buildr/scala/org/apache/buildr/ZincRunner.java +0 -37
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36a159a39fbf246ed408bfc57321642c1e9dfc0e
4
- data.tar.gz: 7b5e62888e2cda7ceb399d9dee62c323be743573
3
+ metadata.gz: 5e7c7c05b4c8533ad6f898776c8bb14d5cb45538
4
+ data.tar.gz: 2476881e560a80a7a298c51a9a1c257bff04d875
5
5
  SHA512:
6
- metadata.gz: af7bfc98d22e8230511d6db65b322c407147f75d1413970b8f631e5f945b834b42285f7a92080ab0ed90fc724126df6cb12caa8a5ca71cc2aff56468c6e06a6c
7
- data.tar.gz: c7d9fb804dcf2f24aee8cd1d928d09e00c66838401f321d3eab0fbfe461d4ddcc2bc53bb120696427e1724b27287a84849ccd9b56cb39d1d83bf030c7b5ce324
6
+ metadata.gz: 7f89e5dcdc7e8c4ac2d2feb4d3ff2943dd7fd7b2757def355115c14aea8606ebac1adefac31ab0d59e9a8a168f773a7af28a1bd7bb8a703fded44f83fea35bc7
7
+ data.tar.gz: 2b278cfa814afa5720fa313bb73dc1c38b1243cc0091867831f1745f2c56ac7c1f39f4a82fc66e6a1730819644389d13cfb3a11dc1fc4c117f07a82370c30da2
data/CHANGELOG CHANGED
@@ -1,3 +1,26 @@
1
+ 1.5.1 (2017-03-11)
2
+ * Change: In the 'buildr/git_auto_version' addon strip out any versions that start with a 'v' character as
3
+ most projects on git repositories prefix version tags with a "v" to avoid collisions with any branchs
4
+ named after the version which are typically without the "v" character.
5
+ * Fixed: GWT Addon: The GWT project publishes invalid jars that can not be included on source path when
6
+ the javadoc tool is executing. Work around this issue in GWT by removing them from the documentation
7
+ class path.
8
+ * Change: IDEA: Change the ordering of dependencies in the IDE module descriptor such that test dependencies are
9
+ first to allow test dependencies to override/shadow compile dependencies.
10
+ * Fixed: IDEA: Correctly configure the IDE module if the language level differs from the root project language level.
11
+ * Change: Add css2gss task to gwt addon to support conveting from deprecated css syntax to modern gss syntax.
12
+ * Change: Add support for gwt 2.8.0 to gwt addon.
13
+ * Change: Remove orderedhash gem.
14
+ * Change: Update jruby-openssl to 0.9.17
15
+ * Change: Move hoe to the development dependencies
16
+ * Fixed: BUILDR-728 Snapshots metadata incorrectly created
17
+ * Fixed: BUILDR-718 Deprecate SVN repository - remove links to SVN
18
+ * Change: BUILDR-724 Use scalamain to call scala projects
19
+ * Change: BUILDR-719 Change User-Agent when uploading artifacts
20
+ * Change: Set the OPEN_IN_BROWSER to false when building idea launch targets via add_glassfish_remote_configuration.
21
+ * Change: BUILDR-709 Integrate `buildr/custom_pom` into core and just make it the default pom generated.
22
+ * Fixed: BUILDR-563 protobuf addon including source directories to protoc breaks build
23
+
1
24
  1.5.0 (2016-09-23)
2
25
  * Change: Update RJB to 1.5.4
3
26
  * Change: Update rubyzip to 1.2.0
@@ -51,7 +74,7 @@
51
74
  * Change: Update the custom_pom addon to generate poms with exclusions section that excludes
52
75
  all transitive dependencies. This is required as buildr dependencies are not
53
76
  transitive while Maven's dependencies are transitive by default.
54
- * Change: Remove the BND aqute maven repository, as it was decomissioned. Use Maven Central instead.
77
+ * Change: Remove the BND aqute maven repository, as it was decommissioned. Use Maven Central instead.
55
78
 
56
79
  1.4.25 (2016-04-18)
57
80
  * Change: BUILDR-712 Update jruby-openssl dependency version or support a range of versions
@@ -21,8 +21,8 @@ module Buildr
21
21
  @@version
22
22
  end
23
23
 
24
- def version=(newVersion)
25
- @@version = newVersion
24
+ def version=(version)
25
+ @@version = version
26
26
  end
27
27
 
28
28
  # The specs for requirements
@@ -96,19 +96,21 @@ module Buildr
96
96
  super
97
97
  @params = {}
98
98
  enhance do
99
+ pom.invoke rescue nil if pom && pom != self && classifier.nil?
100
+
99
101
  filename = self.name
100
102
  # Generate BND file with same name as target jar but different extension
101
103
  bnd_filename = filename.sub /(\.jar)?$/, '.bnd'
102
104
 
103
105
  params = self.to_params
104
- params["-output"] = filename
106
+ params['-output'] = filename
105
107
  File.open(bnd_filename, 'w') do |f|
106
108
  f.print params.collect { |k, v| "#{k}=#{v}" }.join("\n")
107
109
  end
108
110
 
109
111
  Buildr::Bnd.bnd_main( bnd_filename )
110
112
  begin
111
- Buildr::Bnd.bnd_main( "print", "-verify", filename )
113
+ Buildr::Bnd.bnd_main('print', '-verify', filename )
112
114
  rescue => e
113
115
  rm filename
114
116
  raise e
@@ -127,7 +129,7 @@ module Buildr
127
129
 
128
130
  def package_as_bundle(filename)
129
131
  project.task('bnd:print' => [filename]) do |task|
130
- Buildr::Bnd.bnd_main("print", filename)
132
+ Buildr::Bnd.bnd_main('print', filename)
131
133
  end
132
134
 
133
135
  dirname = File.dirname(filename)
@@ -13,275 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
17
- class CustomPom
18
- Developer = Struct.new(:id, :name, :email, :roles)
19
-
20
- # Specify the name of the project
21
- attr_writer :name
22
-
23
- # Retrieve the name of the project, defaulting to the project description or the name if not specified
24
- def name
25
- @name || @buildr_project.comment || @buildr_project.name
26
- end
27
-
28
- # Specify a project description
29
- attr_writer :description
30
-
31
- # Retrieve the project description, defaulting to the name if not specified
32
- def description
33
- @description || name
34
- end
35
-
36
- # Property for the projects url
37
- attr_accessor :url
38
-
39
- # Return the map of licenses for project
40
- def licenses
41
- @licenses ||= {}
42
- end
43
-
44
- # Add Apache2 to the list of licenses
45
- def add_apache_v2_license
46
- self.licenses['The Apache Software License, Version 2.0'] = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
47
- end
48
-
49
- def add_bsd_2_license
50
- self.licenses['The BSD 2-Clause License'] = 'http://opensource.org/licenses/BSD-2-Clause'
51
- end
52
-
53
- def add_bsd_3_license
54
- self.licenses['The BSD 3-Clause License'] = 'http://opensource.org/licenses/BSD-3-Clause'
55
- end
56
-
57
- def add_cddl_v1_license
58
- self.licenses['Common Development and Distribution License (CDDL-1.0)'] = 'http://opensource.org/licenses/CDDL-1.0'
59
- end
60
-
61
- def add_epl_v1_license
62
- self.licenses['Eclipse Public License - v 1.0'] = 'http://www.eclipse.org/legal/epl-v10.html'
63
- end
64
-
65
- def add_gpl_v1_license
66
- self.licenses['GNU General Public License (GPL) version 1.0'] = 'http://www.gnu.org/licenses/gpl-1.0.html'
67
- end
68
-
69
- def add_gpl_v2_license
70
- self.licenses['GNU General Public License (GPL) version 2.0'] = 'http://www.gnu.org/licenses/gpl-2.0.html'
71
- end
72
-
73
- def add_gpl_v3_license
74
- self.licenses['GNU General Public License (GPL) version 3.0'] = 'http://www.gnu.org/licenses/gpl-3.0.html'
75
- end
76
-
77
- def add_lgpl_v2_license
78
- self.licenses['GNU General Lesser Public License (LGPL) version 2.1'] = 'http://www.gnu.org/licenses/lgpl-2.1.html'
79
- end
80
-
81
- def add_lgpl_v3_license
82
- self.licenses['GNU General Lesser Public License (LGPL) version 3.0'] = 'http://www.gnu.org/licenses/lgpl-3.0.html'
83
- end
84
-
85
- def add_mit_license
86
- self.licenses['The MIT License'] = 'http://opensource.org/licenses/MIT'
87
- end
88
-
89
- attr_accessor :scm_url
90
- attr_accessor :scm_connection
91
- attr_accessor :scm_developer_connection
92
-
93
- attr_accessor :issues_url
94
- attr_accessor :issues_system
95
-
96
- # Add a project like add_github_project('realityforge/gwt-appcache')
97
- def add_github_project(project_spec)
98
- git_url = "git@github.com:#{project_spec}.git"
99
- self.scm_connection = self.scm_developer_connection = "scm:git:#{git_url}"
100
- self.scm_url = git_url
101
- web_url = "https://github.com/#{project_spec}"
102
- self.url = web_url
103
- self.issues_url = "#{web_url}/issues"
104
- self.issues_system = 'GitHub Issues'
105
- end
106
-
107
- def developers
108
- @developers ||= []
109
- end
110
-
111
- def add_developer(id, name = nil, email = nil, roles = nil)
112
- self.developers << Developer.new(id, name, email, roles)
113
- end
114
-
115
- def provided_dependencies
116
- @provided_dependencies ||= []
117
- end
118
-
119
- def provided_dependencies=(provided_dependencies)
120
- @provided_dependencies = provided_dependencies
121
- end
122
-
123
- def runtime_dependencies
124
- @runtime_dependencies ||= []
125
- end
126
-
127
- def runtime_dependencies=(runtime_dependencies)
128
- @runtime_dependencies = runtime_dependencies
129
- end
130
-
131
- def optional_dependencies
132
- @optional_dependencies ||= []
133
- end
134
-
135
- def optional_dependencies=(optional_dependencies)
136
- @optional_dependencies = optional_dependencies
137
- end
138
-
139
- protected
140
-
141
- def associate_project(buildr_project)
142
- @buildr_project = buildr_project
143
- end
144
-
145
- def self.pom_xml(project, package)
146
- Proc.new do
147
- xml = Builder::XmlMarkup.new(:indent => 2)
148
- xml.instruct!
149
- xml.project('xmlns' => 'http://maven.apache.org/POM/4.0.0',
150
- 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
151
- 'xsi:schemaLocation' => 'http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd') do
152
- xml.modelVersion '4.0.0'
153
- xml.parent do
154
- xml.groupId 'org.sonatype.oss'
155
- xml.artifactId 'oss-parent'
156
- xml.version '7'
157
- end
158
- xml.groupId project.group
159
- xml.artifactId project.id
160
- xml.version project.version
161
- xml.packaging package.type.to_s
162
- xml.classifier package.classifier if package.classifier
163
-
164
- xml.name project.pom.name if project.pom.name
165
- xml.description project.pom.description if project.pom.description
166
- xml.url project.pom.url if project.pom.url
167
-
168
- xml.licenses do
169
- project.pom.licenses.each_pair do |name, url|
170
- xml.license do
171
- xml.name name
172
- xml.url url
173
- xml.distribution 'repo'
174
- end
175
- end
176
- end
177
-
178
- if project.pom.scm_url || project.pom.scm_connection || project.pom.scm_developer_connection
179
- xml.scm do
180
- xml.connection project.pom.scm_connection if project.pom.scm_connection
181
- xml.developerConnection project.pom.scm_developer_connection if project.pom.scm_developer_connection
182
- xml.url project.pom.scm_url if project.pom.scm_url
183
- end
184
- end
185
-
186
- if project.pom.issues_url
187
- xml.issueManagement do
188
- xml.url project.pom.issues_url
189
- xml.system project.pom.issues_system if project.pom.issues_system
190
- end
191
- end
192
-
193
- xml.developers do
194
- project.pom.developers.each do |developer|
195
- xml.developer do
196
- xml.id developer.id
197
- xml.name developer.name if developer.name
198
- xml.email developer.email if developer.email
199
- if developer.roles
200
- xml.roles do
201
- developer.roles.each do |role|
202
- xml.role role
203
- end
204
- end
205
- end
206
- end
207
- end
208
- end
209
-
210
- xml.dependencies do
211
- provided_deps = Buildr.artifacts(project.pom.provided_dependencies).collect { |d| d.to_s }
212
- runtime_deps = Buildr.artifacts(project.pom.runtime_dependencies).collect { |d| d.to_s }
213
- optional_deps = Buildr.artifacts(project.pom.optional_dependencies).collect { |d| d.to_s }
214
- deps =
215
- Buildr.artifacts(project.compile.dependencies).
216
- select { |d| d.is_a?(ActsAsArtifact) }.
217
- collect do |d|
218
- f = d.to_s
219
- scope = provided_deps.include?(f) ? 'provided' :
220
- runtime_deps.include?(f) ? 'runtime' :
221
- 'compile'
222
- d.to_hash.merge(:scope => scope, :optional => optional_deps.include?(f))
223
- end + Buildr.artifacts(project.test.compile.dependencies).
224
- select { |d| d.is_a?(ActsAsArtifact) && !project.compile.dependencies.include?(d) }.collect { |d| d.to_hash.merge(:scope => 'test') }
225
- deps.each do |dependency|
226
- xml.dependency do
227
- xml.groupId dependency[:group]
228
- xml.artifactId dependency[:id]
229
- xml.version dependency[:version]
230
- xml.scope dependency[:scope] unless dependency[:scope] == 'compile'
231
- xml.optional true if dependency[:optional]
232
- xml.exclusions do
233
- xml.exclusion do
234
- xml.groupId '*'
235
- xml.artifactId '*'
236
- end
237
- end
238
- end
239
- end
240
- end
241
- end
242
- end
243
- end
244
- end
245
- module CPom
246
- module ProjectExtension
247
- include Extension
248
-
249
- def pom
250
- unless @pom
251
- @pom = parent ? parent.pom.dup : Buildr::CustomPom.new
252
- @pom.send :associate_project, self
253
- end
254
- @pom
255
- end
256
-
257
- after_define do |project|
258
- project.packages.each do |pkg|
259
- if pkg.type.to_s == 'jar' && pkg.classifier.nil?
260
- class << pkg
261
- def pom_xml
262
- self.pom.content
263
- end
264
-
265
- def pom
266
- unless @pom
267
- pom_filename = Util.replace_extension(name, 'pom')
268
- spec = {:group => group, :id => id, :version => version, :type => :pom}
269
- @pom = Buildr.artifact(spec, pom_filename)
270
- buildr_project = Buildr.project(self.scope.join(':'))
271
- @pom.content Buildr::CustomPom.pom_xml(buildr_project, self)
272
- end
273
- @pom
274
- end
275
- end
276
- pkg.instance_variable_set('@pom', nil)
277
- pkg.enhance([pkg.pom.to_s])
278
- end
279
- end
280
- end
281
- end
282
- end
283
- end
284
-
285
- class Buildr::Project
286
- include Buildr::CPom::ProjectExtension
287
- end
16
+ msg = "This extension is now included as part of the core Buildr library"
17
+ raise msg if (Buildr::VERSION >= "1.6")
18
+ warn(msg)
@@ -22,7 +22,9 @@ module Buildr
22
22
  unless project.version
23
23
  version_suffix = ENV['BUILD_NUMBER'] ? "-#{ENV['BUILD_NUMBER']}" : ''
24
24
  version_prefix = ENV['VERSION_PREFIX'] ? "#{ENV['VERSION_PREFIX']}-" : ''
25
- project.version = version_prefix + `git describe --tags --always`.strip + version_suffix
25
+ git_version = `git describe --tags --always`.strip
26
+ git_version = git_version.gsub(/^v([0-9])/, '\1')
27
+ project.version = version_prefix + git_version + version_suffix
26
28
  end
27
29
  end
28
30
  end
@@ -15,7 +15,6 @@
15
15
 
16
16
  module Buildr
17
17
  module GWT
18
-
19
18
  class << self
20
19
 
21
20
  def version=(version)
@@ -23,7 +22,7 @@ module Buildr
23
22
  end
24
23
 
25
24
  def version
26
- @version || Buildr.settings.build['gwt'] || '2.7.0'
25
+ @version || Buildr.settings.build['gwt'] || '2.8.0'
27
26
  end
28
27
 
29
28
  # The specs for requirements
@@ -34,18 +33,56 @@ module Buildr
34
33
  gwt_dev_jar = "com.google.gwt:gwt-dev:jar:#{v}"
35
34
  if v <= '2.6.1'
36
35
  [gwt_dev_jar] + validation_deps
37
- else
36
+ elsif v == '2.7.0'
38
37
  [
39
38
  gwt_dev_jar,
40
39
  'org.ow2.asm:asm:jar:5.0.3'
41
40
  ] + validation_deps
41
+ elsif v == '2.8.0'
42
+ %w(
43
+ com.google.jsinterop:jsinterop-annotations:jar:1.0.1
44
+ com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.1
45
+ org.w3c.css:sac:jar:1.3
46
+ com.google.gwt:gwt-dev:jar:2.8.0
47
+ com.google.gwt:gwt-user:jar:2.8.0
48
+ com.google.code.gson:gson:jar:2.6.2
49
+ org.ow2.asm:asm:jar:5.0.3
50
+ org.ow2.asm:asm-util:jar:5.0.3
51
+ org.ow2.asm:asm-tree:jar:5.0.3
52
+ org.ow2.asm:asm-commons:jar:5.0.3
53
+ colt:colt:jar:1.2.0
54
+ ant:ant:jar:1.6.5
55
+ commons-collections:commons-collections:jar:3.2.2
56
+ commons-io:commons-io:jar:2.4
57
+ com.ibm.icu:icu4j:jar:50.1.1
58
+ tapestry:tapestry:jar:4.0.2
59
+
60
+ javax.annotation:javax.annotation-api:jar:1.2
61
+ javax.servlet:javax.servlet-api:jar:3.1.0
62
+ org.eclipse.jetty:jetty-annotations:jar:9.2.14.v20151106
63
+ org.eclipse.jetty:jetty-continuation:jar:9.2.14.v20151106
64
+ org.eclipse.jetty:jetty-http:jar:9.2.14.v20151106
65
+ org.eclipse.jetty:jetty-io:jar:9.2.14.v20151106
66
+ org.eclipse.jetty:jetty-jndi:jar:9.2.14.v20151106
67
+ org.eclipse.jetty:jetty-plus:jar:9.2.14.v20151106
68
+ org.eclipse.jetty:jetty-security:jar:9.2.14.v20151106
69
+ org.eclipse.jetty:jetty-server:jar:9.2.14.v20151106
70
+ org.eclipse.jetty:jetty-servlet:jar:9.2.14.v20151106
71
+ org.eclipse.jetty:jetty-servlets:jar:9.2.14.v20151106
72
+ org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106
73
+ org.eclipse.jetty:jetty-webapp:jar:9.2.14.v20151106
74
+ org.eclipse.jetty:jetty-xml:jar:9.2.14.v20151106
75
+ org.eclipse.jetty.toolchain:jetty-schemas:jar:3.1.M0
76
+ ) + validation_deps
77
+ else
78
+ raise "Unknown GWT version #{v}"
42
79
  end
43
80
  end
44
81
 
45
82
  def gwtc_main(modules, source_artifacts, output_dir, unit_cache_dir, options = {})
46
83
  base_dependencies = self.dependencies(options[:version])
47
84
  cp = Buildr.artifacts(base_dependencies).each(&:invoke).map(&:to_s) + Buildr.artifacts(source_artifacts).each(&:invoke).map(&:to_s)
48
- style = options[:style] || 'OBFUSCATED,' # 'PRETTY', 'DETAILED'
85
+ style = options[:style] || 'OBFUSCATED' # 'PRETTY', 'DETAILED'
49
86
  log_level = options[:log_level] # ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
50
87
  workers = options[:workers] || 2
51
88
 
@@ -55,8 +92,10 @@ module Buildr
55
92
  args << log_level
56
93
  end
57
94
  args << '-strict'
58
- args << '-style'
59
- args << style
95
+ unless style == 'OBFUSCATED'
96
+ args << '-style'
97
+ args << style
98
+ end
60
99
  args << '-localWorkers'
61
100
  args << workers
62
101
  args << '-war'
@@ -71,7 +110,7 @@ module Buildr
71
110
  args << '-draftCompile'
72
111
  end
73
112
 
74
- if options[:enable_closure_compiler].nil? || options[:enable_closure_compiler]
113
+ if options[:enable_closure_compiler] && options[:version] == '2.7.0'
75
114
  args << '-XenableClosureCompiler'
76
115
  end
77
116
 
@@ -106,11 +145,31 @@ module Buildr
106
145
 
107
146
  Java::Commands.java 'com.google.gwt.dev.codeserver.CodeServer', *(args + [{:classpath => cp, :properties => properties, :java_args => java_args, :pathing_jar => false}])
108
147
  end
148
+
149
+ def gwt_css2gss(filenames, options = {})
150
+ cp = Buildr.artifacts(self.dependencies(options[:version])).each(&:invoke).map(&:to_s)
151
+ properties = options[:properties] ? options[:properties].dup : {}
152
+ java_args = options[:java_args] ? options[:java_args].dup : {}
153
+ Java::Commands.java 'com.google.gwt.resources.converter.Css2Gss', *([filenames] + [{ :classpath => cp, :properties => properties, :java_args => java_args, :pathing_jar => false }])
154
+ end
109
155
  end
110
156
 
111
157
  module ProjectExtension
112
158
  include Extension
113
159
 
160
+ after_define(:doc) do |project|
161
+ # Remove gwt artifacts when performing javadocs as the gwt jars have invalid source files
162
+ project.doc.classpath.delete_if { |f| f.to_s =~ /.*\/com\/google\/gwt\/gwt-.*/ }
163
+ end
164
+
165
+ first_time do
166
+ desc 'Run C22 to GSS converter. Set css files via environment variable CSS_FILES'
167
+ task('css2gss') do
168
+ raise 'Please specify css files or directory via variable CSS_FILES' unless ENV['CSS_FILES']
169
+ Buildr::GWT.gwt_css2gss(ENV['CSS_FILES'].to_s.split(' '))
170
+ end
171
+ end
172
+
114
173
  def gwt(module_names, options = {})
115
174
  p = options[:target_project]
116
175
  target_project = p.nil? ? project : p.is_a?(String) ? project(p) : p