Sync version with android gradle plugin
This CL starts loading version from android gradle plugin's
configuration file rather than data binding's configuration
file. This might be an issue in the future if we can support
additional build tools but for now, this will help simplfy
integration with tools.
Bug: 26560734
Change-Id: I1ea6f8e4716873b4ea84930e780c47eb7a6079ec
diff --git a/propLoader.gradle b/propLoader.gradle
index be1ca97..310d313 100644
--- a/propLoader.gradle
+++ b/propLoader.gradle
@@ -1,13 +1,14 @@
/**
* Helper build script that reads data binding variables and sets up the projects.
*/
-def forceReleaseVersion = project.hasProperty('useReleaseVersion') && project.getProperty('useReleaseVersion').equals("true")
def root = ext.dataBindingRootFolder
Properties databindingProperties = new Properties()
databindingProperties.load(new FileInputStream("${root}/databinding.properties"))
-if (forceReleaseVersion) {
- databindingProperties.version = databindingProperties.releaseVersion
-}
+
+// load android gradle plugin's version file
+apply from: "${root}/../buildSrc/base/version.gradle"
+
+databindingProperties.version = ext.buildVersion
databindingProperties.compileSdkVersion = Integer.parseInt(databindingProperties.compileSdkVersionStr)
def repoBase = databindingProperties.mavenRepoAbsolutePath == "." ? root : databindingProperties.mavenRepoAbsolutePath
databindingProperties.androidGradlePluginRepoDir = "${root}/../../${databindingProperties.androidGradlePluginOutRepo}"