Skip to content

Commit 2be76bc

Browse files
authored
fix(build): update version info task to use provider for version details (#10538)
2 parents 8b7494a + 7ffa00d commit 2be76bc

File tree

1 file changed

+4
-4
lines changed
  • build-plugin/plugin/src/main/kotlin/net/thunderbird/gradle/plugin/app/versioning

1 file changed

+4
-4
lines changed

build-plugin/plugin/src/main/kotlin/net/thunderbird/gradle/plugin/app/versioning/VersioningPlugin.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ class VersioningPlugin : Plugin<Project> {
3434
val printVersionInfoTaskName = "printVersionInfo$variantName"
3535

3636
tasks.register<PrintVersionInfoTask>(printVersionInfoTaskName) {
37-
val versionInfo = getVersionInfo(variant).get()
37+
val versionInfoProvider = getVersionInfo(variant)
3838

3939
applicationId = variant.applicationId
4040
applicationLabel = getApplicationLabel(variant)
41-
versionCode = versionInfo.versionCode
42-
versionName = versionInfo.versionName
43-
versionNameSuffix = versionInfo.versionNameSuffix
41+
versionCode = versionInfoProvider.map { it.versionCode }
42+
versionName = versionInfoProvider.map { it.versionName }
43+
versionNameSuffix = versionInfoProvider.map { it.versionNameSuffix }
4444

4545
// Set outputFile only if provided via -PoutputFile=...
4646
project.findProperty("outputFile")?.toString()?.let { path ->

0 commit comments

Comments
 (0)