Skip to content

Commit

Permalink
chore: also publish openid-federation-client
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Oct 28, 2024
1 parent 104e03b commit 2a3ea1d
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions modules/openid-federation-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
plugins {
alias(libs.plugins.kotlinMultiplatform)
kotlin("plugin.serialization") version "2.0.0"
id("maven-publish")
id("dev.petuska.npm.publish") version "3.4.3"
}

val ktorVersion = "3.0.0-beta-2"
Expand Down Expand Up @@ -31,6 +33,29 @@ kotlin {
}
}
}
binaries.library()
compilations["main"].packageJson {
name = "@sphereon/openid-federation-client"
version = rootProject.extra["npmVersion"] as String
description = "OpenID Federation Client Library"
customField("description", "OpenID Federation Client Library")
customField("license", "Apache-2.0")
customField("author", "Sphereon International")
customField(
"repository", mapOf(
"type" to "git",
"url" to "https://github.com/Sphereon-Opensource/openid-federation"
)
)

customField(
"publishConfig", mapOf(
"access" to "public"
)
)

types = "./index.d.ts"
}
}

sourceSets {
Expand Down Expand Up @@ -81,3 +106,22 @@ kotlin {
}
}
}

npmPublish {
registries {
register("npmjs") {
uri.set("https://registry.npmjs.org")
authToken.set(System.getenv("NPM_TOKEN") ?: "")
}
}
packages{
named("js") {
packageJson {
"name" by "@sphereon/openid-federation-client"
"version" by rootProject.extra["npmVersion"] as String
}
scope.set("@sphereon")
packageName.set("openid-federation-client")
}
}
}

0 comments on commit 2a3ea1d

Please sign in to comment.