From 77f517ead3ec019d938d0b99f4fe10a6c49afc44 Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Thu, 22 Aug 2024 16:35:21 +0200 Subject: [PATCH] Add maven pom info --- .../gradle/plugins/PublishPlugin.kt | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/buildTools/gradle/src/main/kotlin/com/infomaniak/gradle/plugins/PublishPlugin.kt b/buildTools/gradle/src/main/kotlin/com/infomaniak/gradle/plugins/PublishPlugin.kt index 9ce53b6e..bd53c80e 100644 --- a/buildTools/gradle/src/main/kotlin/com/infomaniak/gradle/plugins/PublishPlugin.kt +++ b/buildTools/gradle/src/main/kotlin/com/infomaniak/gradle/plugins/PublishPlugin.kt @@ -24,7 +24,7 @@ import org.gradle.api.Project import org.gradle.api.publish.maven.MavenPublication import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.create -import org.gradle.kotlin.dsl.get +import org.gradle.kotlin.dsl.withType class PublishPlugin : Plugin { @@ -42,13 +42,37 @@ class PublishPlugin : Plugin { target.extensions.configure { publications { - create("android") { - from(components.findByName("release")) - artifact(tasks.getByName("bundleReleaseAar")) - artifact(artifact(tasks["sourcesJar"])) - groupId = "com.github.infomaniak.multiplatform_swisstransfer" - artifactId = mavenName - version = Versions.mavenVersionName + withType { + pom { + name.set(mavenName) + description.set("Multiplatform SwissTransfer - $mavenName") + licenses { + license { + name.set("GPL-3.0") + url.set("https://www.gnu.org/licenses/gpl-3.0.fr.html") + } + } + url.set("https://github.com/Infomaniak/multiplatform-SwissTransfer") + issueManagement { + system.set("Github") + url.set("https://github.com/Infomaniak/multiplatform-SwissTransfer/issues") + } + scm { + connection.set("https://github.com/Infomaniak/multiplatform-SwissTransfer.git") + url.set("https://github.com/Infomaniak/multiplatform-SwissTransfer") + } + organization { + name.set("Infomaniak Network SA") + url.set("https://www.infomaniak.com/") + } + developers { + developer { + id.set("infomaniak") + name.set("Infomaniak Development Team") + url.set("https://www.infomaniak.com/") + } + } + } } } }