From 8296759c6f77d29de6b37262682cab38e3cd9fe6 Mon Sep 17 00:00:00 2001 From: Salomon BRYS Date: Tue, 20 Dec 2022 11:33:53 +0100 Subject: [PATCH] Updated to latest KSP --- .../kustomexport/compiler/js/pattern/enum/EnumTransformer.kt | 4 ++-- .../compiler/js/pattern/interface/InterfaceTransformer.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/src/main/kotlin/deezer/kustomexport/compiler/js/pattern/enum/EnumTransformer.kt b/compiler/src/main/kotlin/deezer/kustomexport/compiler/js/pattern/enum/EnumTransformer.kt index ae54187..4a6740c 100644 --- a/compiler/src/main/kotlin/deezer/kustomexport/compiler/js/pattern/enum/EnumTransformer.kt +++ b/compiler/src/main/kotlin/deezer/kustomexport/compiler/js/pattern/enum/EnumTransformer.kt @@ -46,11 +46,11 @@ fun transformEnum(origin: EnumDescriptor): FileSpec { .addAnnotation(jsExport) .primaryConstructor( FunSpec.constructorBuilder() - .addParameter(delegateName, originalClass, KModifier.INTERNAL) .addModifiers(KModifier.INTERNAL) + .addParameter(delegateName, originalClass) .build() ) - .addProperty(PropertySpec.builder(delegateName, originalClass).initializer(delegateName).build()) + .addProperty(PropertySpec.builder(delegateName, originalClass, KModifier.INTERNAL).initializer(delegateName).build()) .addProperty(PropertySpec.builder("name", STRING).initializer("$delegateName.name").build()) .also { builder -> origin.properties diff --git a/compiler/src/main/kotlin/deezer/kustomexport/compiler/js/pattern/interface/InterfaceTransformer.kt b/compiler/src/main/kotlin/deezer/kustomexport/compiler/js/pattern/interface/InterfaceTransformer.kt index 5860fcb..f68bfc5 100644 --- a/compiler/src/main/kotlin/deezer/kustomexport/compiler/js/pattern/interface/InterfaceTransformer.kt +++ b/compiler/src/main/kotlin/deezer/kustomexport/compiler/js/pattern/interface/InterfaceTransformer.kt @@ -161,10 +161,10 @@ private fun buildWrapperClass( .addModifiers(KModifier.PRIVATE) .primaryConstructor( FunSpec.constructorBuilder() - .addParameter(delegateName, delegatedClass, KModifier.INTERNAL) + .addParameter(delegateName, delegatedClass) .build() ) - .addProperty(PropertySpec.builder(delegateName, delegatedClass).initializer(delegateName).build()) + .addProperty(PropertySpec.builder(delegateName, delegatedClass, KModifier.INTERNAL).initializer(delegateName).build()) .addSuperinterface(superClass) .also { builder -> properties.forEach { prop ->