Skip to content

Commit

Permalink
Updated to latest KSP
Browse files Browse the repository at this point in the history
  • Loading branch information
Salomon BRYS committed Dec 20, 2022
1 parent cc7274c commit 8296759
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down

0 comments on commit 8296759

Please sign in to comment.