Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

setup android sdk for self hosted runner

v3.1

setup android sdk for self hosted runner

play

setup android sdk for self hosted runner

setup-android for self hosted runner

Installation

Copy and paste the following snippet into your .yml file.

              

- name: setup android sdk for self hosted runner

uses: amyu/setup-android@v3.1

Learn more about this action in amyu/setup-android

Choose a version

setup-android

This action provides the following functionality for GitHub Actions users:

  • Optionally downloading and caching distribution of the requested sdk version or build tools version or ndk,cmake version, and adding it to the PATH
  • Runs on Mac, Linux and Windows powered by SelfHostedRunner

Motivation

This Action is provided for SelfHostedRunner.
GithubHostedRunner does not need this Action as it already has the SDK set up.

Usage

See action.yml

Basic:

steps:
  - uses: actions/checkout@v4
  - name: Setup JDK 17
    uses: actions/setup-java@v3
    with:
      java-version: 17
      distribution: temurin
      
  - name: Setup Android SDK
    uses: amyu/setup-android@v3

  - run: ./gradlew build --stacktrace

Additional:

steps:
  - uses: actions/checkout@v4
  - name: Setup JDK 17
    uses: actions/setup-java@v3
    with:
      java-version: 17
      distribution: temurin
      
  - name: Setup Android SDK
    uses: amyu/setup-android@v3
    with:
      # default: false
      # Whether to use the cache     
      cache-disabled: true
      
      # default: '33'
      # sdk version
      # see https://developer.android.com/studio/releases/platforms
      # It will always be installed.
      sdk-version: '33'
      
      # default: '33.0.2'
      # build tools version
      # see https://developer.android.com/studio/releases/build-tools
      # It will always be installed.
      build-tools-version: '33.0.2'
      
      # default: ''
      # cmake version
      # see https://developer.android.com/studio/projects/install-ndk
      # Installed when the version is specified
      cmake-version: '3.10.2.4988404'

      # default: ''
      # cmake version
      # see https://developer.android.com/studio/projects/install-ndk
      # Installed when the version is specified
      ndk-version: '23.1.7779620'

      # default: true
      # Whether to generate or not the job summary     
      generate-job-summary: false

  - run: ./gradlew build --stacktrace

License

The scripts and documentation in this project are released under the MIT License

Contributions

Contributions are welcome!