diff --git a/build.gradle.kts b/build.gradle.kts index f51f2ff..84c5f5f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { alias(libs.plugins.kotlinMultiplatform) apply false alias(libs.plugins.kotlinJvm) apply false alias(libs.plugins.kotlinSerialization) apply false - alias(libs.plugins.dokka) apply true + alias(libs.plugins.dokka) apply false } allprojects { @@ -13,11 +13,6 @@ allprojects { version = libraryVersion } -dependencies { - dokka(project(":kpaypal-api:kpaypal-core")) - dokka(project(":kpaypal-api:kpaypal-webhook")) -} - private fun Project.git(vararg command: String): String { val output = ByteArrayOutputStream() exec { diff --git a/kpaypal-api/build.gradle.kts b/kpaypal-api/build.gradle.kts index e69de29..8a480a8 100644 --- a/kpaypal-api/build.gradle.kts +++ b/kpaypal-api/build.gradle.kts @@ -0,0 +1,45 @@ +import java.lang.System.getenv + +plugins { + alias(libs.plugins.dokka) +} + +dependencies { + dokka(project(":kpaypal-api:kpaypal-core")) + dokka(project(":kpaypal-api:kpaypal-webhook")) +} + +subprojects { + apply(plugin = "org.jetbrains.dokka") +} + +dokka { + moduleName.set("KPayPal") + dokkaSourceSets.all { + includes.from("docs/INFO.md") + sourceLink { + localDirectory.set(file("src/main/kotlin")) + remoteUrl("https://kpaypal.worldmandia.cc") + remoteLineSuffix.set("#L") + } + } + pluginsConfiguration.html { + footerMessage.set("(c) WorldMandia") + } +} + +repositories { + maven { + name = "WorldMandia" + url = if (version.toString() + .endsWith("SNAPSHOT") + ) uri("https://repo.worldmandia.cc/snapshots") else uri("https://repo.worldmandia.cc/releases") + credentials { + username = getenv("MAVEN_NAME") + password = getenv("MAVEN_SECRET") + } + authentication { + create("basic") + } + } +} \ No newline at end of file diff --git a/kpaypal-api/kpaypal-webhook/docs/INFO.md b/kpaypal-api/docs/INFO.md similarity index 50% rename from kpaypal-api/kpaypal-webhook/docs/INFO.md rename to kpaypal-api/docs/INFO.md index d792028..d7ba1e3 100644 --- a/kpaypal-api/kpaypal-webhook/docs/INFO.md +++ b/kpaypal-api/docs/INFO.md @@ -1,3 +1,7 @@ +Module KPayPal-core + +### 🚧 This library is under active development 🚧 + Module KPayPal-webhook ### 🚧 This library is under active development 🚧 \ No newline at end of file diff --git a/kpaypal-api/kpaypal-core/build.gradle.kts b/kpaypal-api/kpaypal-core/build.gradle.kts index 46247a3..e909ce0 100644 --- a/kpaypal-api/kpaypal-core/build.gradle.kts +++ b/kpaypal-api/kpaypal-core/build.gradle.kts @@ -1,9 +1,6 @@ -import java.lang.System.getenv - plugins { alias(libs.plugins.kotlinMultiplatform) alias(libs.plugins.kotlinSerialization) - alias(libs.plugins.dokka) alias(libs.plugins.updateDeps) `maven-publish` } @@ -47,24 +44,13 @@ kotlin { } } +dokka { + moduleName.set("KPayPal-Core") +} + publishing { - repositories { - maven { - name = "WorldMandia" - url = if (version.toString() - .endsWith("SNAPSHOT") - ) uri("https://repo.worldmandia.cc/snapshots") else uri("https://repo.worldmandia.cc/releases") - credentials { - username = getenv("MAVEN_NAME") - password = getenv("MAVEN_SECRET") - } - authentication { - create("basic") - } - } - } publications { - create("kpaypalApi") { + create("kpaypalCore") { from(components["kotlin"]) pom { name.set("KPayPal-core") @@ -96,19 +82,4 @@ publishing { } } } -} - -dokka { - moduleName.set("KPayPal-core") - dokkaSourceSets.all { - includes.from("docs/INFO.md") - sourceLink { - localDirectory.set(file("src/main/kotlin")) - remoteUrl("https://kpaypal.worldmandia.cc") - remoteLineSuffix.set("#L") - } - } - pluginsConfiguration.html { - footerMessage.set("(c) WorldMandia") - } } \ No newline at end of file diff --git a/kpaypal-api/kpaypal-core/docs/INFO.md b/kpaypal-api/kpaypal-core/docs/INFO.md deleted file mode 100644 index 4b98bc4..0000000 --- a/kpaypal-api/kpaypal-core/docs/INFO.md +++ /dev/null @@ -1,3 +0,0 @@ -Module KPayPal-core - -### 🚧 This library is under active development 🚧 \ No newline at end of file diff --git a/kpaypal-api/kpaypal-webhook/build.gradle.kts b/kpaypal-api/kpaypal-webhook/build.gradle.kts index 226da77..1aa9dbc 100644 --- a/kpaypal-api/kpaypal-webhook/build.gradle.kts +++ b/kpaypal-api/kpaypal-webhook/build.gradle.kts @@ -1,7 +1,6 @@ plugins { alias(libs.plugins.kotlinMultiplatform) alias(libs.plugins.kotlinSerialization) - alias(libs.plugins.dokka) alias(libs.plugins.updateDeps) `maven-publish` } @@ -23,16 +22,41 @@ kotlin { } dokka { - moduleName.set("KPayPal-webhook") - dokkaSourceSets.all { - includes.from("docs/INFO.md") - sourceLink { - localDirectory.set(file("src/main/kotlin")) - remoteUrl("https://kpaypal.worldmandia.cc") - remoteLineSuffix.set("#L") + moduleName.set("KPayPal-Webhook") +} + +publishing { + publications { + create("kpaypalWebhook") { + from(components["kotlin"]) + pom { + name.set("KPayPal-webhook") + description.set("Idiomatic Kotlin Wrapper for The PayPal API") + url.set("https://github.com/mani1232/KPayPal") + + licenses { + license { + name.set("GNU License") + url.set("https://github.com/mani1232/KPayPal/blob/master/HEADER.txt") + } + } + + developers { + developer { + id.set("mani1232") + name.set("mani1232") + email.set("support@worldmandia.cc") + organization.set("WorldMandia") + organizationUrl.set("https://worldmandia.cc") + } + } + + scm { + connection.set("scm:git:git://github.com/mani1232/KPayPal.git") + developerConnection.set("scm:git:ssh://github.com/KPayPal.git") + url.set("https://github.com/mani1232/KPayPal") + } + } } } - pluginsConfiguration.html { - footerMessage.set("(c) WorldMandia") - } } \ No newline at end of file