class Gradle < Formula desc "Open-source build automation tool based on the Groovy and Kotlin DSL" homepage "https://www.gradle.org/" url "https://services.gradle.org/distributions/gradle-6.0-all.zip" sha256 "a1eb4439c0a85bc7e64a22658d862e43b7d0ddfbf69a7abf6256e0b7514295df" bottle :unneeded depends_on :java => "1.8+" def install rm_f Dir["bin/*.bat"] libexec.install %w[bin docs lib samples src] (bin/"gradle").write_env_script libexec/"bin/gradle", Language::Java.overridable_java_home_env end test do assert_match version.to_s, shell_output("#{bin}/gradle --version") end end