From 982054d3e9e3dc80807faa6f8be8ba4dd09ce7de Mon Sep 17 00:00:00 2001 From: Nathanael Anderson Date: Mon, 12 Oct 2020 21:44:32 -0500 Subject: [PATCH] fix: build.gradle & kotlinVersion Not sure if it is a change in Gradle Versions; but the "BeforeEvaluate" function does NOT get called before the setting of the `kotlinVersion` in the top group. So any external properties set in `gradle.properties` are NOT set at the point we check for it. Copying the code to the top section in the `initialize` fixes the issue, however more tests will need to be done to see if we can just remove the beforeEvaluate section without any negative side effects. --- test-app/build.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test-app/build.gradle b/test-app/build.gradle index 2fd4891de..f29506c8a 100644 --- a/test-app/build.gradle +++ b/test-app/build.gradle @@ -7,6 +7,13 @@ buildscript { apply from: "$rootDir/gradle-helpers/user_properties_reader.gradle" apply from: "$rootDir/gradle-helpers/paths.gradle" rootProject.ext.userDefinedGradleProperties = getUserProperties("${getAppResourcesPath(userDir)}/Android") + if (rootProject.hasProperty("userDefinedGradleProperties")) { + rootProject.ext.userDefinedGradleProperties.each { entry -> + def propertyName = entry.getKey() + def propertyValue = entry.getValue() + project.ext.set(propertyName, propertyValue) + } + } } initialize()