<commit_before>class AndroidSdk < Formula
  homepage "https://developer.android.com/index.html"
  url "https://dl.google.com/android/android-sdk_r24.1.2-macosx.zip"
  version "24.1.2"
  sha256 "a4441a4770130aa841f350918a16db43aaee18f2d8e0c681a216e0381a763362"

  conflicts_with "android-platform-tools",
    :because => "The Android Platform-Tools need to be installed as part of the SDK."

  resource "completion" do
    url "https://raw.githubusercontent.com/CyanogenMod/android_sdk/938c8d70af7d77dfcd1defe415c1e0deaa7d301b/bash_completion/adb.bash"
    sha256 "6ae8fae2a07c7a286d440d5f5bdafdd0c208284d7c8be21a0f59d96bb7426091"
  end

  # Version of the android-build-tools the wrapper scripts reference.
  def build_tools_version
    "21.1.2"
  end

  def install
    prefix.install "tools", "SDK Readme.txt" => "README"

    %w[android ddms draw9patch emulator
       emulator-arm emulator-x86 hierarchyviewer lint mksdcard
       monitor monkeyrunner traceview].each do |tool|
      (bin/tool).write <<-EOS.undent
        #!/bin/bash
        TOOL="#{prefix}/tools/#{tool}"
        exec "$TOOL" "$@"
      EOS
    end

    %w[zipalign].each do |tool|
      (bin/tool).write <<-EOS.undent
        #!/bin/bash
        TOOL="#{prefix}/build-tools/#{build_tools_version}/#{tool}"<commit_msg>android-sdk 24.2<commit_after>class AndroidSdk < Formula
  homepage "https://developer.android.com/index.html"
  url "https://dl.google.com/android/android-sdk_r24.2-macosx.zip"
  version "24.2"
  sha256 "9e0cd4844a696c555563a2daad5ff6731a4175b7a56f00c8f8dd831dbca9511b"

  conflicts_with "android-platform-tools",
    :because => "The Android Platform-Tools need to be installed as part of the SDK."

  resource "completion" do
    url "https://raw.githubusercontent.com/CyanogenMod/android_sdk/938c8d70af7d77dfcd1defe415c1e0deaa7d301b/bash_completion/adb.bash"
    sha256 "6ae8fae2a07c7a286d440d5f5bdafdd0c208284d7c8be21a0f59d96bb7426091"
  end

  # Version of the android-build-tools the wrapper scripts reference.
  def build_tools_version
    "22.0.1"
  end

  def install
    prefix.install "tools", "SDK Readme.txt" => "README"

    %w[android ddms draw9patch emulator
       emulator-arm emulator-x86 hierarchyviewer lint mksdcard
       monitor monkeyrunner traceview].each do |tool|
      (bin/tool).write <<-EOS.undent
        #!/bin/bash
        TOOL="#{prefix}/tools/#{tool}"
        exec "$TOOL" "$@"
      EOS
    end

    %w[zipalign].each do |tool|
      (bin/tool).write <<-EOS.undent
        #!/bin/bash
        TOOL="#{prefix}/build-tools/#{build_tools_version}/#{tool}"
{'fraction_non_alphanumeric': 0.11855869817900039, 'fraction_numerical': 0.09259976753196436, 'mean_word_length': 3.5943060498220643, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '316546', 'n_tokens_mistral': 1099, 'n_tokens_neox': 962, 'n_words': 164}