I have the following simple build configuration with a task:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 15
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
task compileSass(type:Exec) {
commandLine 'sass', "src/main/theme/default.scss", "src/main/assets/default.css"
}
project.afterEvaluate{
preBuild.dependsOn("compileSass")
}
}
The build runs just fine when run from the command line with gradle installDebug
but fails when running from Android Studio with the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':PixateTest:compileSass'.
> A problem occurred starting process 'command 'sass''
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
How can I pass the parameters, such as --stacktrace, from Android Studio to Gradle so I can debug why the task fails?
On OSX: Android Studio -> Preferences -> Compiler -> Gradle -> Command-line Options
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With