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
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register<Jar>("dokkaHtmlJar") {
|
|
|
|
dependsOn(tasks.dokkaHtml)
|
|
|
|
from(tasks.dokkaHtml.flatMap { it.outputDirectory })
|
|
|
|
archiveClassifier.set("html-docs")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register<Jar>("dokkaJavadocJar") {
|
|
|
|
dependsOn(tasks.dokkaJavadoc)
|
|
|
|
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
|
|
|
|
archiveClassifier.set("javadoc")
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
create<MavenPublication>("mavenJava") {
|
|
|
|
from(components["kotlin"])
|
|
|
|
|
|
|
|
artifact(tasks["dokkaHtmlJar"])
|
|
|
|
artifact(tasks["dokkaJavadocJar"])
|
|
|
|
|
|
|
|
pom {
|
|
|
|
name.set("Permission Checker")
|
|
|
|
description.set("A project for checking permissions")
|
|
|
|
url.set("https://github.com/ThunderNetworkRaD/permission-checker")
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name.set("The Apache License, Version 2.0")
|
|
|
|
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id.set("thundernetwork")
|
|
|
|
name.set("Thunder Network")
|
|
|
|
email.set("thundernetwork.org@gmail.com")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scm {
|
|
|
|
connection.set("scm:git:git://github.com/ThunderNetworkRaD/permission-checker.git")
|
|
|
|
developerConnection.set("scm:git:ssh://github.com/ThunderNetworkRaD/permission-checker.git")
|
|
|
|
url.set("https://github.com/ThunderNetworkRaD/permission-checker")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = "OSSRH"
|
|
|
|
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
|
|
|
credentials {
|
|
|
|
username = System.getenv("MAVEN_USERNAME")
|
|
|
|
password = System.getenv("MAVEN_PASSWORD")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = "GitHub"
|
|
|
|
url = uri("https://maven.pkg.github.com/ThunderNetworkRaD/permission-checker")
|
|
|
|
credentials {
|
|
|
|
username = System.getenv("GITHUB_ACTOR")
|
|
|
|
password = System.getenv("GPJ_PASSWORD")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-07-04 21:38:57 +02:00
|
|
|
}
|