permission-checker/build.gradle.kts

86 lines
1.9 KiB
Text
Raw Permalink Normal View History

2024-07-04 21:38:57 +02:00
plugins {
kotlin("multiplatform") version "2.0.0"
id("maven-publish")
2024-07-19 16:06:04 +02:00
id("signing")
id("org.jetbrains.dokka") version "1.9.20"
2024-07-04 21:38:57 +02:00
}
group = "org.thundernetwork.permissionchecker"
2024-07-19 16:06:04 +02:00
version = "3.0.0"
2024-07-04 21:38:57 +02:00
repositories {
mavenCentral()
}
dependencies {
}
kotlin {
2024-07-19 16:06:04 +02:00
jvm {
withSourcesJar()
}
2024-07-05 00:06:30 +02:00
js (IR) {
nodejs {}
binaries.library()
generateTypeScriptDefinitions()
useEsModules()
2024-07-04 21:38:57 +02:00
}
sourceSets {
val commonMain by getting {
dependencies {
}
}
val jvmMain by getting {
dependencies {
}
}
val jsMain by getting {
dependencies {
}
}
}
2024-07-19 16:06:04 +02:00
js {
compilations["main"].packageJson {
customField("homepage", "https://github.com/ThunderNetworkRaD/permission-checker")
2024-07-04 21:38:57 +02:00
}
}
2024-07-04 22:03:54 +02:00
}
tasks.register<Copy>("prepareNpmPublication") {
2024-07-05 00:10:12 +02:00
dependsOn("jsNodeProductionLibraryDistribution", "jsPackageJson")
2024-07-04 22:03:54 +02:00
from("build/js/packages/${project.name}", "README.md")
into("build/npm")
}
tasks.register("publishToNpm") {
dependsOn("prepareNpmPublication")
doLast {
exec {
workingDir("build/npm")
commandLine("npm", "publish")
}
}
2024-07-19 16:06:04 +02:00
}
publishing {
repositories {
2024-07-19 16:35:43 +02:00
// maven {
// name = "OSSRH"
// url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
// credentials {
// username = System.getenv("OSSRH_USERNAME")
// password = System.getenv("OSSRH_PASSWORD")
// }
// }
2024-07-19 16:06:04 +02:00
maven {
name = "GitHub"
url = uri("https://maven.pkg.github.com/ThunderNetworkRaD/permission-checker")
credentials {
username = System.getenv("GITHUB_ACTOR")
2024-07-19 16:31:06 +02:00
password = System.getenv("GITHUB_TOKEN")
2024-07-19 16:06:04 +02:00
}
}
}
2024-07-04 21:38:57 +02:00
}