Skip to content

Commit

Permalink
JS OID naming workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Oct 29, 2024
1 parent 88c57ce commit 755a103
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions indispensable-asn1/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import at.asitplus.gradle.*
import com.squareup.kotlinpoet.ClassName
import com.squareup.kotlinpoet.FileSpec
import com.squareup.kotlinpoet.PropertySpec
import com.squareup.kotlinpoet.TypeSpec
import com.squareup.kotlinpoet.*
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.js.backend.ast.JsName
import java.io.FileInputStream
import java.util.regex.Pattern

Expand Down Expand Up @@ -137,8 +135,14 @@ fun generateKnowOIDs() {
'.'
)
}`: ${oidTriple.comment}"
)
).apply {
if(name.matches(Regex("^[0.-9].*")))
this.addAnnotation(AnnotationSpec.builder(ClassName("kotlin.js","JsName")).addMember("\"_$name\"").build())
}


.build()

)
}

Expand All @@ -152,8 +156,6 @@ fun generateKnowOIDs() {

}



kotlin {
jvm()
macosArm64()
Expand Down

0 comments on commit 755a103

Please sign in to comment.