Skip to content

Commit

Permalink
Add conversion of nested SourceSets using named()
Browse files Browse the repository at this point in the history
  • Loading branch information
mherod authored and bernaferrari committed Jan 28, 2020
1 parent 36643d3 commit cbb7235
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gradlekotlinconverter.kts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ fun String.convertSigningConfigBuildType(): String {
fun String.convertBuildTypes(): String = this.convertNestedTypes("buildTypes", "named")


// sourceSets { test }
// becomes
// sourceSets { named("test") }
fun String.convertSourceSets(): String = this.convertNestedTypes("sourceSets", "named")


// signingConfigs { release }
// becomes
// signingConfigs { register("release") }
Expand Down Expand Up @@ -583,6 +589,7 @@ val convertedText = textToConvert
.convertInternalBlocks()
.convertInclude()
.convertBuildTypes()
.convertSourceSets()
.convertSigningConfigs()
.convertExcludeClasspath()
.convertJetBrainsKotlin()
Expand Down

0 comments on commit cbb7235

Please sign in to comment.