permission-checker/build.gradle.kts

88 lines
1.9 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-04 22:12:23 +02:00
version = "2.1"
2024-07-04 21:38:57 +02:00
repositories {
mavenCentral()
}
dependencies {
}
kotlin {
jvm {}
js {
nodejs {
}
binaries.executable()
}
sourceSets {
val commonMain by getting {
dependencies {
}
}
val jvmMain by getting {
dependencies {
}
}
val jsMain by getting {
dependencies {
}
}
}
}
tasks {
val jsProductionExecutableCompileSync by getting
val jsNodeRun by getting {
dependsOn(jsProductionExecutableCompileSync)
}
val jsNodeDevelopmentRun by getting {
dependsOn(jsProductionExecutableCompileSync)
}
val jsDevelopmentExecutableCompileSync by getting
val jsNodeProductionRun by getting {
dependsOn(jsDevelopmentExecutableCompileSync)
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["kotlin"])
groupId = project.group.toString()
artifactId = "permission-checker"
version = project.version.toString()
}
}
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") {
dependsOn("jsProductionExecutableCompileSync", "jsPackageJson")
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
}