From 71582e2f2907c99c02bffaa8e127893e2dbf5be8 Mon Sep 17 00:00:00 2001 From: nbransby Date: Sun, 27 Aug 2023 14:33:45 +0300 Subject: [PATCH] wip configure publishing --- build.gradle.kts | 78 +++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2b75077..2c918cf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -26,6 +26,7 @@ group = "dev.gitlive" version = project.property("version") as String java { + withSourcesJar() sourceCompatibility = JavaVersion.VERSION_11 } @@ -89,7 +90,7 @@ val cleanLibs by tasks.creating(Delete::class) { delete("$buildDir/libs") } -configure { +publishing { repositories { maven { @@ -101,46 +102,47 @@ configure { } } - publications.all { - this as MavenPublication - - pom { - name.set("firebase-java-sdk") - description.set("The Firebase Java SDK is a pure java port of the Firebase Android SDK to run in clientside java environments such as the desktop.") - url.set("https://github.com/GitLiveApp/firebase-java-sdk") - inceptionYear.set("2023") - - scm { - url.set("https://github.com/GitLiveApp/firebase-java-sdk") - connection.set("scm:git:https://github.com/GitLiveApp/firebase-java-sdk.git") - developerConnection.set("scm:git:https://github.com/GitLiveApp/firebase-java-sdk.git") - tag.set("HEAD") - } - - issueManagement { - system.set("GitHub Issues") - url.set("https://github.com/GitLiveApp/firebase-java-sdk/issues") - } - - developers { - developer { - name.set("Nicholas Bransby-Williams") - email.set("nbransby@gmail.com") - } - } - - licenses { - license { - name.set("The Apache Software License, Version 2.0") - url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") - distribution.set("repo") - comments.set("A business-friendly OSS license") - } + publications { + create("library") { + from(components["java"]) + + pom { + name.set("firebase-java-sdk") + description.set("The Firebase Java SDK is a pure java port of the Firebase Android SDK to run in clientside java environments such as the desktop.") + url.set("https://github.com/GitLiveApp/firebase-java-sdk") + inceptionYear.set("2023") + + scm { + url.set("https://github.com/GitLiveApp/firebase-java-sdk") + connection.set("scm:git:https://github.com/GitLiveApp/firebase-java-sdk.git") + developerConnection.set("scm:git:https://github.com/GitLiveApp/firebase-java-sdk.git") + tag.set("HEAD") + } + + issueManagement { + system.set("GitHub Issues") + url.set("https://github.com/GitLiveApp/firebase-java-sdk/issues") + } + + developers { + developer { + name.set("Nicholas Bransby-Williams") + email.set("nbransby@gmail.com") + } + } + + licenses { + license { + name.set("The Apache Software License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + distribution.set("repo") + comments.set("A business-friendly OSS license") + } + } } } } - -} + } dependencies { compileOnly("org.robolectric:android-all:12.1-robolectric-8229987")