2 desc "Java-based scripting language"
3 homepage "https://www.groovy-lang.org/"
4 url "https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-groovy-binary-4.0.25.zip"
5 sha256 "822cad8e03388f23bf613d37f990b813bb4165fe389fd3fcc24f8b96476c30ef"
9 url "https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/"
10 regex(/href=.*?apache-groovy-binary[._-]v?(\d+(?:\.\d+)+)\.zip/i)
14 sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ca901974e16788e25606c527434078bfc7318068db230cd3299f502c14090a8"
15 sha256 cellar: :any_skip_relocation, arm64_sonoma: "b0ca05c6a1b392e02da91c603506e0bf401d88169650bbbaf97047bbe1b79f44"
16 sha256 cellar: :any_skip_relocation, arm64_ventura: "727ba13f764b371a17df2afd03a52e2c509d43553538cc0fc150391d4ad72406"
17 sha256 cellar: :any_skip_relocation, sonoma: "6469f693d616f1c662dbac79217d771997c591c5c21f3c2a00743bd1b22100b2"
18 sha256 cellar: :any_skip_relocation, ventura: "3c1dab55e70f2a4f3de261598b3dfc1346085a11789714ee66a50f6df731c5c3"
19 sha256 cellar: :any_skip_relocation, x86_64_linux: "8eb98117c31ce438ff85be1c4445873200b6e389b405111ab3a56955bb9c06eb"
25 # Temporary build dependencies for compiling jansi-native
26 depends_on "autoconf" => :build
27 depends_on "automake" => :build
28 depends_on "libtool" => :build
29 depends_on "maven" => :build
31 # jansi-native is used to build native binary to support Apple Silicon.
32 # Source version is from jline-2.14.6 -> jansi-1.12 -> jansi-native-1.6
33 # TODO: Remove once updated to jline-3.x: https://issues.apache.org/jira/browse/GROOVY-8162
34 resource "jansi-native" do
35 url "https://github.com/fusesource/jansi-native/archive/refs/tags/jansi-native-1.6.tar.gz"
36 sha256 "f4075ad012c9ed79eaa8d3240d869e10d94ca8b130f3e7dac2ba3978dce0fb21"
38 # Update pom.xml to replace unsupported Java 6 source and to disable universal binary
43 conflicts_with "groovysdk", because: "both install the same binaries"
47 jline_jar = buildpath/"lib/jline-2.14.6.jar"
48 resource("jansi-native").stage do
49 # Fix compile with newer Clang
50 ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403
52 system "mvn", "-Dplatform=osx", "prepare-package"
53 system "zip", "-d", jline_jar, "META-INF/native/*"
54 system "jar", "-uvf", jline_jar,
55 "-C", "target/generated-sources/hawtjni/lib",
56 "META-INF/native/osx64/libjansi.jnilib"
60 # Don't need Windows files.
63 libexec.install "bin", "conf", "lib"
64 bin.install Dir["#{libexec}/bin/*"] - ["#{libexec}/bin/groovy.ico"]
65 bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env
70 You should set GROOVY_HOME:
71 export GROOVY_HOME=#{opt_libexec}
76 output = shell_output("#{bin}/grape install org.activiti activiti-engine 5.16.4")
77 assert_match "found org.activiti#activiti-engine;5.16.4", output
78 assert_match "65536\n===> null\n", pipe_output("#{bin}/groovysh", "println 64*1024\n:exit\n")
83 diff --git a/pom.xml b/pom.xml
84 index 369cc8c..6dbac6f 100644
88 <groupId>org.apache.maven.plugins</groupId>
89 <artifactId>maven-compiler-plugin</artifactId>
91 - <source>1.5</source>
92 - <target>1.5</target>
93 + <source>1.8</source>
94 + <target>1.8</target>
103 - <!-- Profile which enables Universal binaries on OS X -->
107 - <os><family>mac</family></os>
112 - <groupId>org.fusesource.hawtjni</groupId>
113 - <artifactId>maven-hawtjni-plugin</artifactId>
116 - <osgiPlatform>osname=MacOS;processor=x86-64</osgiPlatform>
117 - <osgiPlatform>osname=MacOS;processor=x86</osgiPlatform>
118 - <osgiPlatform>osname=MacOS;processor=PowerPC</osgiPlatform>
119 - <osgiPlatform>*</osgiPlatform>
122 - <arg>--with-universal</arg>
124 - <platform>osx</platform>