/
utils.rb
30 lines (25 loc) · 821 Bytes
/
utils.rb
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
class Utils < Formula
desc "A collection of utilities used throughout my libraries."
@@jar_name="Utils.jar"
@@project_url="https://github.com/Toberumono/Utils"
homepage "#{@@project_url}"
url "#{@@project_url}.git", :tag => "1.14.1"
head "#{@@project_url}.git"
depends_on :java => "1.8+"
depends_on "ant" => :build
def install
system "ant", "-Dprefix=./"
lib.install "#{@@jar_name}"
doc.install Dir["doc/*"]
end
def caveats
<<-EOS.undent
In order to reference #{@@jar_name} in a Java program,
add #{HOMEBREW_PREFIX}/lib/#{@@jar_name} to your classpath.
The documentation can be found in:
#{HOMEBREW_PREFIX}/share/doc/#{name}
run 'open #{HOMEBREW_PREFIX}/share/doc/#{name}/index.html'
to view it in your default web browser.
EOS
end
end