permission-checker/build.gradle.kts

91 lines
2.2 KiB
Text
Raw Normal View History

2024-07-04 21:38:57 +02:00
plugins {
2024-09-02 22:24:02 +02:00
kotlin("multiplatform") version "2.0.20"
2024-07-04 21:38:57 +02:00
id("maven-publish")
2024-07-19 16:06:04 +02:00
id("signing")
2024-07-04 21:38:57 +02:00
}
group = "org.thundernetwork.permissionchecker"
2024-09-02 22:24:02 +02:00
version = "3.0.1"
2024-07-04 21:38:57 +02:00
repositories {
2024-09-02 22:24:02 +02:00
maven("https://repository.thundernetwork.org/repository/maven-central/")
2024-07-04 21:38:57 +02:00
}
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-09-02 22:24:02 +02:00
compilations["main"].packageJson {
customField("types", "kotlin/${project.name}.d.ts")
}
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-09-02 22:24:02 +02:00
dependsOn("kotlinUpgradeYarnLock", "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 {
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-09-02 22:24:02 +02:00
}
//rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
// rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().download = false
// // "true" for default behavior
//}
//
//rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin> {
// rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().download = false
// // "true" for default behavior
//}