This plugin enables you to update Android SDK components in the Gradle build script.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gradle/wrapper
src
.gitignore
LICENSE.txt
NOTICE.txt
README.markdown
build.gradle
gradlew
gradlew.bat

README.markdown

Gradle plugin: info.vividcode.android.sdk-manager

This plugin allows you to update Android SDK components in the Gradle build script.

Gradle Plugin Portal

This plugin is distributed through the Gradle Plugin Portal:

Usage (version 0.9.x)

// Write the dependency of the build script.
buildscript {
  repositories {
    maven {
      url 'https://plugins.gradle.org/m2/'
    }
  }
  dependencies {
    classpath 'gradle.plugin.info.vividcode.android.build:vc-gradle-android-sdk-manager:0.9.0'
  }
}
// Apply plugin.
apply plugin: 'info.vividcode.android.sdk-manager'
    // then, you can use `androidSdkManager`
// Update SDK Components with filters.
// You may have to do this before applying android plugin.
androidSdkManager.updateSdkComponents(['tools', 'platform-tools'])
// Update SDK Platform and Build tools after project is evaluated.
androidSdkManager.updateSdkPlatformAndBuildToolsAfterEvaluate()

If you'd like to make the plugin accept the license of Android SDK automatically, use the acceptLicenseAutomatically option. Please use this option in your responsibility.

// Example of `acceptLicenseAutomatically: true` option.
androidSdkManager.updateSdkComponents(['tools', 'platform-tools'],
        acceptLicenseAutomatically: true)
androidSdkManager.updateSdkPlatformAndBuildToolsAfterEvaluate(
        acceptLicenseAutomatically: true)

Projects with similar purpose

License

This project is released under the Apache License, Version 2.0. The LICENSE.txt file is a copy of the License.