Skip to content

Commit 982054d

Browse files
author
Nathanael Anderson
authored
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.
1 parent 6601d7d commit 982054d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test-app/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ buildscript {
77
apply from: "$rootDir/gradle-helpers/user_properties_reader.gradle"
88
apply from: "$rootDir/gradle-helpers/paths.gradle"
99
rootProject.ext.userDefinedGradleProperties = getUserProperties("${getAppResourcesPath(userDir)}/Android")
10+
if (rootProject.hasProperty("userDefinedGradleProperties")) {
11+
rootProject.ext.userDefinedGradleProperties.each { entry ->
12+
def propertyName = entry.getKey()
13+
def propertyValue = entry.getValue()
14+
project.ext.set(propertyName, propertyValue)
15+
}
16+
}
1017
}
1118
initialize()
1219

0 commit comments

Comments
 (0)