Skip to content

Commit cfcd8b2

Browse files
committed
Make Project.prop(name: String) use providers.gradleProperty instead of properties
1 parent e32ec2a commit cfcd8b2

File tree

1 file changed

+1
-1
lines changed
  • build-plugins/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/util

1 file changed

+1
-1
lines changed

build-plugins/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/util/ProjectExt.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public fun Project.localProperties(): Map<String, Any> {
4545
* * property from extras
4646
* @return property if it exists or null
4747
*/
48-
public fun Project.prop(name: String): Any? = properties[name] ?: localProperties()[name] ?: extra.getOrNull(name)
48+
public fun Project.prop(name: String): Any? = providers.gradleProperty(name).orNull ?: localProperties()[name] ?: extra.getOrNull(name)
4949

5050
inline fun <reified T> Project.typedProp(name: String): T? {
5151
val any = prop(name)

0 commit comments

Comments
 (0)