From 900cc63e9c7846e60c442c01e21f6c8061b751d6 Mon Sep 17 00:00:00 2001 From: tclement0922 Date: Sun, 8 Sep 2024 13:07:27 +0200 Subject: [PATCH] Add back kdoc for packaged font functions --- plugins/src/main/kotlin/dev/tclement/fonticons/FAVariant.kt | 3 +++ .../main/kotlin/dev/tclement/fonticons/SymbolsVariant.kt | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/plugins/src/main/kotlin/dev/tclement/fonticons/FAVariant.kt b/plugins/src/main/kotlin/dev/tclement/fonticons/FAVariant.kt index 293d993b..040d7f9e 100644 --- a/plugins/src/main/kotlin/dev/tclement/fonticons/FAVariant.kt +++ b/plugins/src/main/kotlin/dev/tclement/fonticons/FAVariant.kt @@ -58,6 +58,9 @@ private abstract class CreateFAVariantTask : DefaultTask() { ) """.trimIndent() ) + .addKdoc(""" + The FontAwesome Free ${variant.uppercaseFirstChar()} font. + """.trimIndent()) .build() fileSpecBuilder.addFunction(functionSpec) fileSpecBuilder.addImport("dev.tclement.fonticons", "rememberStaticIconFont") diff --git a/plugins/src/main/kotlin/dev/tclement/fonticons/SymbolsVariant.kt b/plugins/src/main/kotlin/dev/tclement/fonticons/SymbolsVariant.kt index a8853b86..8956ec50 100644 --- a/plugins/src/main/kotlin/dev/tclement/fonticons/SymbolsVariant.kt +++ b/plugins/src/main/kotlin/dev/tclement/fonticons/SymbolsVariant.kt @@ -57,6 +57,12 @@ private abstract class CreateSymbolsVariantTask : DefaultTask() { val expectFunctionSpec = commonFunSpec() .addParameter(ParameterSpec.builder("grade", Int::class).defaultValue("0").build()) .addParameter(ParameterSpec.builder("fill", Boolean::class).defaultValue("false").build()) + .addKdoc(""" + The Material Symbols variable font, ${variant.uppercaseFirstChar()} variant. + + @param grade grade of the font, between -50 and 200, 0 by default + @param fill whether to use the filled variation of the icons or not, false by default + """.trimIndent()) .addModifiers(KModifier.EXPECT) .build() commonFileSpecBuilder.addFunction(expectFunctionSpec)