permission-checker/build.gradle.kts

76 lines
1.6 KiB
Text
Raw Normal View History

2024-07-04 21:38:57 +02:00
plugins {
kotlin("multiplatform") version "2.0.0"
id("maven-publish")
}
group = "org.thundernetwork.permissionchecker"
2024-07-05 00:06:30 +02:00
version = "2.2"
2024-07-04 21:38:57 +02:00
repositories {
mavenCentral()
}
dependencies {
}
kotlin {
jvm {}
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 {
}
}
}
}
publishing {
2024-07-04 22:18:30 +02:00
// publications {
// create<MavenPublication>("mavenJava") {
// from(components["kotlin"])
// groupId = project.group.toString()
// artifactId = "permission-checker"
// version = project.version.toString()
// }
// }
2024-07-04 21:38:57 +02:00
repositories {
maven {
2024-07-04 21:41:53 +02:00
url = uri("https://source.thundernetwork.org/api/packages/ThunderNetworkRaD/maven") // Replace with your Maven repository URL
2024-07-04 21:38:57 +02:00
credentials {
2024-07-04 21:41:53 +02:00
username = ""
password = ""
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-04 21:38:57 +02:00
}