JakeWharton / sdk-manager-plugin

DEPRECATED Gradle plugin which downloads and manages your Android SDK.
Apache License 2.0
1.41k stars 142 forks source link

Plugin doesn't work with gradle 2.2.1, android gradle plugin 1.2.3 (1.2.2) #77

Closed ultraon closed 9 years ago

ultraon commented 9 years ago

Hello, it seems to plugin doesn't work with my project. We use SDK Tools 24.3, Build Tools 22.0.1, Platform Tools 22, android gradle plugin 1.2.3, gradle 2.2.1.

When i use following configuration:

apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'

sdkManager {
  emulatorVersion 'android-19'
  emulatorArchitecture 'armeabi-v7a' // optional, defaults to arm
}

then start command "./gradlew clean assemble", i get following error:

Could not find method sdkManager() for arguments [build_dacvu57stp2ir956ean5vm7nd$_run_closure1@74f280bd] on project...

Also, could you please give advice, how to check plugin works or no?

artem-zinnatullin commented 9 years ago

Release with support for configuration via sdkManager {} closure is not published yet. See #73.

ultraon commented 9 years ago

Thanks, what about question "Also, could you please give advice, how to check plugin works or no?"

Also i want to understand could i apply this plugin to all my project modules (have a lot of modules) if i put it in root build.gradle file?

artem-zinnatullin commented 9 years ago

To check that plugin works you can execute Gradle with one of logging level flag, for example:

./gradlew clean build --info

Sdk-Manager will print: "SDK resolve took someTime ms".

And yes, you can add plugin to the buildScript's classPath in the root build.gradle, but you should apply plugin: android-sdk-manager in each submodule where you want to use Sdk-Manager.

ultraon commented 9 years ago

@artem-zinnatullin , Thank's a lot!!!

artem-zinnatullin commented 9 years ago

@ultraon glad to help, if you don't have other questions related to this issue, please close it :)