buildSrc/src/main/kotlin/RepositoryChangeset.kt
changeset 102 47363ef81dc3
parent 34 ce299aacc068
equal deleted inserted replaced
101:dc93e4229242 102:47363ef81dc3
   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 }