Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Formula/gradle.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
class Gradle < Formula
desc "Open-source build automation tool based on the Groovy and Kotlin DSL"
homepage "https://www.gradle.org/"
# TODO: switch dependency to `openjdk` on 7.6.
# Ref: https://github.com/gradle/gradle/issues/20372
url "https://services.gradle.org/distributions/gradle-7.5.1-all.zip"
sha256 "db9c8211ed63f61f60292c69e80d89196f9eb36665e369e7f00ac4cc841c2219"
license "Apache-2.0"
revision 1

livecheck do
url "https://gradle.org/install/"
Expand All @@ -14,12 +17,12 @@ class Gradle < Formula
sha256 cellar: :any_skip_relocation, all: "022acd562e864e9ffd39dabc3c5c45df19b7ebe9aa0dee25b895ef410a01a3b9"
end

depends_on "openjdk"
depends_on "openjdk@17"

def install
rm_f Dir["bin/*.bat"]
libexec.install %w[bin docs lib src]
env = Language::Java.overridable_java_home_env
env = Language::Java.overridable_java_home_env("17")
(bin/"gradle").write_env_script libexec/"bin/gradle", env
end

Expand Down