This repository has been archived by the owner on Mar 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildfile
84 lines (66 loc) · 2.66 KB
/
buildfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
require 'buildr/git_auto_version'
require 'buildr/gpg'
require 'buildr/gwt'
GWT_EXAMPLES=%w(arez.networkstatus.example.NetworkStatusExample)
desc 'Arez-NetworkStatus: Arez Browser component that tracks when the user is online'
define 'arez-networkstatus' do
project.group = 'org.realityforge.arez.networkstatus'
compile.options.source = '1.8'
compile.options.target = '1.8'
compile.options.lint = 'all'
project.version = ENV['PRODUCT_VERSION'] if ENV['PRODUCT_VERSION']
dom_artifact = artifact(:arez_core)
pom.include_transitive_dependencies << dom_artifact
pom.dependency_filter = Proc.new {|dep| dom_artifact == dep[:artifact]}
project.processorpath << :arez_processor
compile.with :javax_annotation,
:jsinterop_base,
:jsinterop_annotations,
:elemental2_core,
:elemental2_promise,
:elemental2_dom,
:braincheck,
:arez_core
gwt_enhance(project)
package(:jar)
package(:sources)
package(:javadoc)
doc.
using(:javadoc,
:windowtitle => 'Arez NetworkStatus API Documentation',
:linksource => true,
:timestamp => false,
:link => %w(https://arez.github.io/api https://docs.oracle.com/javase/8/docs/api http://www.gwtproject.org/javadoc/latest/)
)
iml.excluded_directories << project._('tmp')
ipr.extra_modules << 'example/example.iml'
ipr.add_component_from_artifact(:idea_codestyle)
GWT_EXAMPLES.each do |gwt_module|
short_name = gwt_module.gsub(/.*\./, '')
ipr.add_gwt_configuration(project,
:iml_name => 'example',
:name => "GWT Example: #{short_name}",
:gwt_module => gwt_module,
:start_javascript_debugger => false,
:vm_parameters => '-Xmx2G',
:shell_parameters => "-port 8888 -codeServerPort 8889 -bindAddress 0.0.0.0 -war #{_(:generated, 'gwt-export', short_name)}/")
end
end
define 'example', :base_dir => "#{File.dirname(__FILE__)}/example" do
compile.options.source = '1.8'
compile.options.target = '1.8'
compile.with project('arez-networkstatus').package(:jar),
project('arez-networkstatus').compile.dependencies,
:gwt_user
gwt_enhance(project)
gwt_modules = {}
GWT_EXAMPLES.each do |gwt_module|
gwt_modules[gwt_module] = false
end
iml.add_gwt_facet(gwt_modules,
:settings => { :compilerMaxHeapSize => '1024' },
:gwt_dev_artifact => :gwt_dev)
project.no_ipr
end
task('idea' => 'example:idea')
task('package' => 'example:package')