<commit_before>
user = node[:settings][:user]

gradle_script = IO.read(File.join(
	File.expand_path(File.dirname(__FILE__)), "gradle"))

script "add-gradle-bindir" do
  cwd "/tmp"
  interpreter "bash"
  code "mkdir -p /opt/gradle/bin"
  not_if "test -d /opt/gradle/bin"
end

script "add-gradle-verdir" do
  cwd "/tmp"
  interpreter "bash"
  code "mkdir -p /opt/gradle/versions"
  not_if "test -d /opt/gradle/versions"
end

%w{1.4 1.6 1.7 1.8 1.9}.each do |ver|
  script "install-gradle-#{ver}" do
    cwd "/tmp"
    interpreter "bash"
    code "
      unzip /vagrant/cache/gradle-#{ver}-bin.zip
      mv gradle-#{ver} /opt/gradle/versions/#{ver}
    "
    not_if "test -d /opt/gradle/versions/#{ver}"
  end
end

script "add-gradle-wrapper" do<commit_msg>Forgot to actually install 1.10 via chef<commit_after>
user = node[:settings][:user]

gradle_script = IO.read(File.join(
	File.expand_path(File.dirname(__FILE__)), "gradle"))

script "add-gradle-bindir" do
  cwd "/tmp"
  interpreter "bash"
  code "mkdir -p /opt/gradle/bin"
  not_if "test -d /opt/gradle/bin"
end

script "add-gradle-verdir" do
  cwd "/tmp"
  interpreter "bash"
  code "mkdir -p /opt/gradle/versions"
  not_if "test -d /opt/gradle/versions"
end

%w{1.4 1.6 1.7 1.8 1.9 1.10}.each do |ver|
  script "install-gradle-#{ver}" do
    cwd "/tmp"
    interpreter "bash"
    code "
      unzip /vagrant/cache/gradle-#{ver}-bin.zip
      mv gradle-#{ver} /opt/gradle/versions/#{ver}
    "
    not_if "test -d /opt/gradle/versions/#{ver}"
  end
end

script "add-gradle-wrapper" do
{'fraction_non_alphanumeric': 0.16623376623376623, 'fraction_numerical': 0.016883116883116882, 'mean_word_length': 3.120320855614973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4618853', 'n_tokens_mistral': 660, 'n_tokens_neox': 620, 'n_words': 142}