diff --git a/CHANGELOG.md b/CHANGELOG.md index fc60776..cee125d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.1.2 + +### Fixed +- Replace wrong "elseif" with "if" in generated CMakeLists file + # 0.1.1 ### Fixed diff --git a/secretsvaultplugin/build.gradle.kts b/secretsvaultplugin/build.gradle.kts index 1793480..5007305 100644 --- a/secretsvaultplugin/build.gradle.kts +++ b/secretsvaultplugin/build.gradle.kts @@ -51,4 +51,4 @@ configure { } group = "com.commencis.secretsvaultplugin" -version = "0.1.1" +version = "0.1.2" diff --git a/secretsvaultplugin/src/main/kotlin/com/commencis/secretsvaultplugin/KeepSecretsTask.kt b/secretsvaultplugin/src/main/kotlin/com/commencis/secretsvaultplugin/KeepSecretsTask.kt index ec8e75e..4f8f8e5 100644 --- a/secretsvaultplugin/src/main/kotlin/com/commencis/secretsvaultplugin/KeepSecretsTask.kt +++ b/secretsvaultplugin/src/main/kotlin/com/commencis/secretsvaultplugin/KeepSecretsTask.kt @@ -347,9 +347,10 @@ internal abstract class KeepSecretsTask : DefaultTask() { } sourceSets.groupBy { getCmakeArgumentName(it) }.forEach { map -> val (cMakeArgument, sourceSetList) = map - sourceSetList.forEachIndexed { index, sourceSet -> + var isFirstSourceSet = true + for (sourceSet in sourceSetList) { if (sourceSet == mainSourceSet) { - return@forEachIndexed + continue } val fileName = getKotlinSecretsFileName(sourceSet).removeSuffix(KOTLIN_FILE_NAME_SUFFIX) textBuilder.append( @@ -357,9 +358,10 @@ internal abstract class KeepSecretsTask : DefaultTask() { sourceSet = sourceSet, mappingFileName = fileName, cmakeArgumentName = cMakeArgument, - index == 0, + isFirstSourceSet, ) ) + isFirstSourceSet = false } if (sourceSetList.count { sourceSet -> sourceSet != mainSourceSet } > 1) { textBuilder.append("\nendif()\n")