buildSrc/src/main/kotlin/RepositoryChangeset.kt
changeset 93 0f0e69edeafc
parent 91 c02a6ae4f610
equal deleted inserted replaced
92:55f4c1d6eed0 93:0f0e69edeafc
   130         // are only available on the variant output.
   130         // are only available on the variant output.
   131         // Here gather the output when we are in single mode (ie no multi-apk)
   131         // Here gather the output when we are in single mode (ie no multi-apk)
   132         val mainOutput = it.outputs.single { it.outputType == OutputType.SINGLE }
   132         val mainOutput = it.outputs.single { it.outputType == OutputType.SINGLE }
   133 
   133 
   134         // create version Code generating task
   134         // create version Code generating task
   135         val versionCodeTask = project.tasks.register<VersionCodeTask>("computeVersionCodeFor${it.name.capitalized()}") {
   135         val versionCodeTask = project.tasks.register<VersionCodeTask>("computeVersionCodeFor${it.name.replaceFirstChar { it.titlecase() }}") {
   136             this.major.set(major)
   136             this.major.set(major)
   137             this.minor.set(minor)
   137             this.minor.set(minor)
   138             this.patch.set(patch)
   138             this.patch.set(patch)
   139             repositoryDirectory.set(project.rootDir.absolutePath)
   139             repositoryDirectory.set(project.rootDir.absolutePath)
   140             versionCodeOutputFile.set(project.layout.buildDirectory.file("intermediates/versionCode.txt"))
   140             versionCodeOutputFile.set(project.layout.buildDirectory.file("intermediates/versionCode.txt"))