Allow out of tree builds.
Before modularisation of the code, it was possible to do an out of tree build giving an -PbuildDir=someDir argument to gradle. With the modularisation, it's broken as using -PbuildDir=someDir will force the same directory for each projects, which breaks the gradle build system. This commit adds a new externalBuildDir project property to allow out of tree builds again. When set, it updates the buildDir property for each project to point to ${externalBuildDir}/${project.name}. That way, the build artifacts are written in the out of tree directory in a project specific folder. To do an out of tree build, use gradle -PexternalBuildDir=someDir ... It supports absolute and relative path. Relative path are interpreted against the ExoPlayer root directory.
This commit is contained in:
parent
da1b55ed4c
commit
41f4f24f53
@ -51,6 +51,11 @@ allprojects {
|
||||
releaseVersion = 'r2.3.1'
|
||||
releaseWebsite = 'https://github.com/google/ExoPlayer'
|
||||
}
|
||||
if (it.hasProperty('externalBuildDir')) {
|
||||
if (!new File(externalBuildDir).isAbsolute())
|
||||
externalBuildDir = new File(rootDir, externalBuildDir)
|
||||
buildDir = "${externalBuildDir}/${project.name}"
|
||||
}
|
||||
}
|
||||
|
||||
def getBintrayRepo() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user