Merge pull request #2002 from drabux/fix_gradle_free_build__properties

Fix gradle free builds
This commit is contained in:
Martin Fietz 2016-06-09 09:25:22 +02:00
commit ac8fc02c8e
3 changed files with 29 additions and 5 deletions

View File

@ -109,9 +109,23 @@ android {
}
}
configurations {
freeDebugCompile
freeReleaseCompile
playDebugCompile
playReleaseCompile
}
dependencies {
freeCompile project(path: ":core", configuration: "freeRelease")
playCompile project(path: ":core", configuration: "playRelease")
freeDebugCompile project(path: ":core", configuration: "freeDebug")
freeReleaseCompile project(path: ":core", configuration: "freeRelease")
// free build hack: skip some dependencies
if (!doFreeBuild()) {
playDebugCompile project(path: ":core", configuration: "playDebug")
playReleaseCompile project(path: ":core", configuration: "playRelease")
} else {
System.out.println("app: free build hack, skipping some dependencies")
}
compile "com.android.support:support-v4:$supportVersion"
compile "com.android.support:appcompat-v7:$supportVersion"
compile "com.android.support:design:$supportVersion"

View File

@ -70,3 +70,8 @@ project.ext {
task wrapper(type: Wrapper) {
gradleVersion = "2.11"
}
// free build hack: common functions
def doFreeBuild() {
return hasProperty("freeBuild")
}

View File

@ -67,9 +67,14 @@ dependencies {
compile "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion"
// Add casting features
// free build hack: skip some dependencies
if (!doFreeBuild()) {
playCompile "com.google.android.libraries.cast.companionlibrary:ccl:$castCompanionLibVer"
compile "com.android.support:mediarouter-v7:$supportVersion"
playCompile "com.google.android.gms:play-services-cast:$playServicesVersion"
} else {
System.out.println("core: free build hack, skipping some dependencies")
}
}
allprojects {