Skip to content

Instantly share code, notes, and snippets.

@noamtamim
Last active February 21, 2024 10:19
Show Gist options
  • Save noamtamim/b04ef67239d2b43638aa5a9a024a1937 to your computer and use it in GitHub Desktop.
Save noamtamim/b04ef67239d2b43638aa5a9a024a1937 to your computer and use it in GitHub Desktop.

Revisions

  1. noamtamim revised this gist Jan 20, 2019. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions android-sdk-license.sh
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,11 @@
    The script creates 'licenses' under '$ANDROID_HOME' and creates a file which proves
    that the SDK license was accepted by the user.
    Please copy this to your own account/gist/server. Every time there's an updated license, update the file with the new license hash.
    Please copy this to your own account/gist/server. Every time there's an updated license, update the file with the new
    license hash.
    Legally if you run this script (or your own version of it), it means YOU accepted the license - don't trust someone else.
    The hashes below are supposed to be taken from $ANDROID_HOME/licenses/android-sdk-license on YOUR machine.
    The hashes below are supposed to be taken from $ANDROID_HOME/licenses/android-sdk-license on YOUR machine, after you
    accepted the license yourself.
    See here for more info: https://developer.android.com/studio/intro/update#download-with-gradle
    Usage:
  2. noamtamim revised this gist Jan 20, 2019. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions android-sdk-license.sh
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,12 @@
    << ////
    The script creates 'licenses' under '$ANDROID_HOME' and creates a file which proves
    that the SDK license was accepted by the user.
    Please copy this to your own account/gist/server. Every time there's an updated license, update the file with the new license hash.
    Legally if you run this script (or your own version of it), it means YOU accepted the license - don't trust someone else.
    The hashes below are supposed to be taken from $ANDROID_HOME/licenses/android-sdk-license on YOUR machine.
    See here for more info: https://developer.android.com/studio/intro/update#download-with-gradle
    Usage:
    In .travis.yml
    before_script:
  3. noamtamim created this gist Jan 20, 2019.
    25 changes: 25 additions & 0 deletions android-sdk-license.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    #!/bin/bash

    << ////
    The script creates 'licenses' under '$ANDROID_HOME' and creates a file which proves
    that the SDK license was accepted by the user.
    Usage:
    In .travis.yml
    before_script:
    - curl URL_OF_THIS_FILE | sh
    In jitpack.yml
    before_install:
    - curl URL_OF_THIS_FILE | sh
    ////

    set -ex

    cd $ANDROID_HOME
    mkdir -p licenses

    cat << EOF >> licenses/android-sdk-license
    8933bad161af4178b1185d1a37fbf41ea5269c55
    d56f5187479451eabf01fb78af6dfcb131a6481e
    24333f8a63b6825ea9c5514f83c2829b004d1fee
    EOF