Create Project.isPropertyValueIsTrue extension.

Change-Id: I550739d630b82c252add80a277fe1248e7577d74
pull/1576/head
Jaehwa Noh 1 year ago
parent 3a71f267cc
commit 96f4b50b6a

@ -32,3 +32,9 @@ val Project.libs
internal fun Project.relativeToRootProject(dir: String): Provider<Directory> =
rootProject.layout.buildDirectory.dir(projectDir.toRelativeString(rootDir))
.map { it.dir(dir) }
/**
* Check a [propertyName]'s property value is true.
*/
internal fun Project.isPropertyValueIsTrue(propertyName: String): Boolean =
properties[propertyName].toString().toBoolean()

Loading…
Cancel
Save