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

Downloaded android SDK doesn't contain proguard #57

Closed danikula closed 9 years ago

danikula commented 9 years ago

I don't specify path to android-sdk, so sdk-manager-plugin downloads sdk, tools, play services, support library and starts to build projects, but fails with message:

...
:app:proguardDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:proguardDebug'.
> java.io.FileNotFoundException: C:\Users\danik\.android-sdk\tools\proguard\proguard-android.txt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Downloaded by sdk-manager-plugin android-sdk doesn't contain proguard at path C:\Users\danik\.android-sdk\tools\

My build.gradle is

buildscript {
...
    dependencies {
        classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
...
    }
}

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

android {
    compileSdkVersion 21
    buildToolsVersion '21.0.2'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 18 
...
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
            runProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        release {
            runProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-release.pro', 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
}
meredrica commented 9 years ago

yea, providing proguard configs would be nice. jenkins configuration effort would practically drop to zero if this was implemented

meredrica commented 9 years ago

Update: seems like this is missing in the android sdk package and has nothing to do with this plugin: https://code.google.com/p/android/issues/detail?id=72419

JakeWharton commented 9 years ago

New SDK is on master and will be in the next release.

Egorand commented 9 years ago

Hi @JakeWharton

When do you plan to release this fix?

Thanks

niedzielski commented 8 years ago

If there's a way I can help out with a release or snapshot release, please let me know!

debrechtabel commented 8 years ago

@Egorand @niedzielski For a workaround until the next release, check out https://github.com/JakeWharton/sdk-manager-plugin/issues/73#issuecomment-106747867