forked from sjackman/linuxbrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (28 loc) · 927 Bytes
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 AdoptopenjdkAT11 < Formula
desc "Prebuilt binaries produced from OpenJDK class libraries"
homepage "https://adoptopenjdk.net/"
url "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz"
version "11.0.3.7"
sha256 "23cded2b43261016f0f246c85c8948d4a9b7f2d44988f75dad69723a7a526094"
# 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