From a16da731cf24e052489528ccb68acdb3f1b7e9d7 Mon Sep 17 00:00:00 2001 From: Doddddd <1524010598@qq.com> Date: Fri, 27 Jun 2025 00:54:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BD=AC=E4=B9=89=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=80=BC=E4=B8=AD=E7=9A=84=20$=EF=BC=8C=E9=81=BF=E5=85=8D=20Ja?= =?UTF-8?q?vadoc=20=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/generator/PropertiesAccessorsGenerator.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sweetproperty-gradle-plugin/src/main/java/com/highcapable/sweetproperty/plugin/generator/PropertiesAccessorsGenerator.kt b/sweetproperty-gradle-plugin/src/main/java/com/highcapable/sweetproperty/plugin/generator/PropertiesAccessorsGenerator.kt index 8945c44..ebc9e64 100644 --- a/sweetproperty-gradle-plugin/src/main/java/com/highcapable/sweetproperty/plugin/generator/PropertiesAccessorsGenerator.kt +++ b/sweetproperty-gradle-plugin/src/main/java/com/highcapable/sweetproperty/plugin/generator/PropertiesAccessorsGenerator.kt @@ -203,11 +203,12 @@ internal class PropertiesAccessorsGenerator { addMethod( MethodSpec.methodBuilder("get${getOrCreateUsedSuccessiveMethodName(methodName, className).capitalize()}").apply { val typedValue = value.parseTypedValue(configs.isEnableTypeAutoConversion) - addJavadoc("Resolve the \"$accessorsName\" value ${typedValue.second}") + val safeValueForJavadoc = typedValue.second.replace("$", "$$") + addJavadoc("Resolve the \"$accessorsName\" value $safeValueForJavadoc") addModifiers(Modifier.PUBLIC, Modifier.FINAL) .addAnnotation(Nonnull::class.java) .returns(typedValue.first.java) - .addStatement("return ${typedValue.second}") + .addStatement("return $safeValueForJavadoc") }.build() )