buildSrc/src/main/kotlin/RepositoryChangeset.kt
changeset 91 c02a6ae4f610
parent 75 534a19e25217
child 93 0f0e69edeafc
equal deleted inserted replaced
90:a27056a818b6 91:c02a6ae4f610
   147         //    and therefore the file is created.
   147         //    and therefore the file is created.
   148         // 2. contains task dependency information so that the consumer(s) run after the producer.
   148         // 2. contains task dependency information so that the consumer(s) run after the producer.
   149         mainOutput.versionCode.set(versionCodeTask.map { it.versionCodeOutputFile.get().asFile.readText().toInt() })
   149         mainOutput.versionCode.set(versionCodeTask.map { it.versionCodeOutputFile.get().asFile.readText().toInt() })
   150         mainOutput.versionName.set("$major.$minor.$patch$versionNameSuffix")
   150         mainOutput.versionName.set("$major.$minor.$patch$versionNameSuffix")
   151 
   151 
   152         it.buildConfigFields.put("REPOSITORY_CHANGESET", versionCodeTask.map {
   152         it.buildConfigFields?.put("REPOSITORY_CHANGESET", versionCodeTask.map {
   153             BuildConfigField("String", "\"${it.changesetOutputFile.get().asFile.readText()}\"", "Repository changeset")
   153             BuildConfigField("String", "\"${it.changesetOutputFile.get().asFile.readText()}\"", "Repository changeset")
   154         })
   154         })
   155     }
   155     }
   156 }
   156 }