Skip to content

Instantly share code, notes, and snippets.

@tryprasannan
Last active September 27, 2016 14:04
Show Gist options
  • Save tryprasannan/66e13d012145d2a84cfe to your computer and use it in GitHub Desktop.
Save tryprasannan/66e13d012145d2a84cfe to your computer and use it in GitHub Desktop.
Propogate BuildTypes to dependant modules in android gradle plugin
dependencies {
releaseCompile project(path: ':library_module', configuration: 'release') // Build release version of lib when building release version of app
debugCompile project(path: ':library_module', configuration: 'debug') // Build debug version of lib when building debug version of app
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
}
}
apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.hugo'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
//....
// Required for Hugo to work until Gradle Android Plugin propagates debug/release build types to dependant modeules from app
// Ref : https://code.google.com/p/android/issues/detail?id=52962
publishNonDefault true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment