diff --git a/buildSrc/src/main/kotlin/BuildInfo.kt b/buildSrc/src/main/kotlin/BuildInfo.kt index 06b4aea5..3020857b 100644 --- a/buildSrc/src/main/kotlin/BuildInfo.kt +++ b/buildSrc/src/main/kotlin/BuildInfo.kt @@ -350,6 +350,8 @@ open class BuildInfo(private val project: Project) { // could be `commitId: Provider = project.provider { ... }` val commitId: String by lazy { + // allow -DcommitId=abc123 for build environments that don't have git. + System.getProperty("commitId").let { if (it != null) return@lazy it } // only run command once per build invocation if (project === project.rootProject) { val process =