Skip to content

Commit

Permalink
gradle-profiler: bump openjdk@11 to openjdk
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Dec 6, 2024
1 parent 6a8e359 commit a01180d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Formula/g/gradle-profiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,19 @@ class GradleProfiler < Formula
sha256 cellar: :any_skip_relocation, all: "efaeffff25c03add41a89b4b1b7fcde8be147afd96baae57366787ffa9ba5c90"
end

# gradle currently does not support Java 17 (ARM)
# gradle@6 is still default gradle-version, but does not support Java 16
# Switch to `openjdk` once above situations are no longer true
depends_on "openjdk@11"
depends_on "openjdk"

def install
rm(Dir["bin/*.bat"])
libexec.install %w[bin lib]
env = Language::Java.overridable_java_home_env("11")
env = Language::Java.overridable_java_home_env
(bin/"gradle-profiler").write_env_script libexec/"bin/gradle-profiler", env
end

test do
(testpath/"settings.gradle").write ""
(testpath/"build.gradle").write 'println "Hello"'
output = shell_output("#{bin}/gradle-profiler --gradle-version 7.0 --profile chrome-trace")
assert_includes output, "* Results written to"
output = shell_output("#{bin}/gradle-profiler --gradle-version 8.11 --profile chrome-trace")
assert_includes output, "* Writing results to"
end
end

0 comments on commit a01180d

Please sign in to comment.