forked from sjackman/linuxbrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadoptopenjdk.rb
32 lines (28 loc) · 920 Bytes
/
adoptopenjdk.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
31
32
class Adoptopenjdk < Formula
desc "Prebuilt binaries produced from OpenJDK class libraries"
homepage "https://adoptopenjdk.net/"
url "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u212-b03/OpenJDK8U-jdk_x64_linux_hotspot_8u212b03.tar.gz"
version "1.8.0.212"
sha256 "dd28d6d2cde2b931caf94ac2422a2ad082ea62f0beee3bf7057317c53093de93"
# tag "linux"
bottle :unneeded
depends_on :linux
def install
prefix.install Dir["*"]
share.install prefix/"man"
end
test do
(testpath/"Hello.java").write <<~EOS
class Hello
{
public static void main(String[] args)
{
System.out.println("Hello Homebrew");
}
}
EOS
system bin/"javac", "Hello.java"
assert_predicate testpath/"Hello.class", :exist?, "Failed to compile Java program!"
assert_equal "Hello Homebrew\n", shell_output("#{bin}/java Hello")
end
end