Putting a % character in a string causes the build to fail with this exception:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':generateI18n4kFiles'.
....
Caused by: java.lang.IllegalArgumentException: index 1 for '% ' not in range (received 0 arguments)
at com.squareup.kotlinpoet.CodeBlock$Builder.add(CodeBlock.kt:312)
at com.squareup.kotlinpoet.Documentable$Builder.addKdoc(Documentable.kt:27)
at com.squareup.kotlinpoet.PropertySpec$Builder.addKdoc(PropertySpec.kt:278)
at de.comahe.i18n4k.generator.I18n4kGenerator.generateMessagesObject(I18n4kGenerator.kt:188)
at de.comahe.i18n4k.generator.I18n4kGenerator.generateSourceCode(I18n4kGenerator.kt:137)
at de.comahe.i18n4k.generator.I18n4kGenerator.run(I18n4kGenerator.kt:115)
at de.comahe.i18n4k.generator.I18n4kProcessor.execute(I18n4kProcessor.kt:68)
....
I don't think there's any need for i18n4k to use these placeholder sequences, so maybe all text passed into the PropertSpec should replace all % characters with %%?
Putting a
%
character in a string causes the build to fail with this exception:It's coming from the kotlinpoet library which has some specific syntax it looks for: https://github.com/square/kotlinpoet/blob/main/kotlinpoet/src/main/java/com/squareup/kotlinpoet/CodeBlock.kt#L32-L59
I don't think there's any need for i18n4k to use these placeholder sequences, so maybe all text passed into the PropertSpec should replace all
%
characters with%%
?