aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/gradle.rb
blob: 9c44bc90971c5e2b5e5da9b40096fe041550b586 (plain)
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
require 'formula'

class Gradle <Formula
  homepage 'http://www.gradle.org/'
  url 'http://dist.codehaus.org/gradle/gradle-0.8-all.zip'
  head 'http://dist.codehaus.org/gradle/gradle-0.9-rc-2-all.zip'

  if ARGV.build_head?
    version '0.9-rc-2'
    md5 '0fc5dcd67c826f136087f52c2692b5ac'
  else
    version '0.8'
    md5 '73a0ed51b6ec00a7d3a9d242d51aae60'
  end

  def install
    rm_f Dir["bin/*.bat"]

    if ARGV.build_head?
      libexec.install %w[bin lib]
    else
      libexec.install %w[bin lib gradle-imports plugin.properties]
    end

    bin.mkpath
    ln_s libexec+('bin/gradle'), bin
  end
end