From 4c09de722ca793ea3cebc96378f61efc5923e221 Mon Sep 17 00:00:00 2001 From: Joseph Earl Date: Tue, 19 Mar 2024 21:45:56 +0000 Subject: [PATCH 1/6] Add Maven Central repository --- build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.gradle b/build.gradle index 6216576..a3898ae 100644 --- a/build.gradle +++ b/build.gradle @@ -79,11 +79,20 @@ publishing { } repositories { maven { + name = "GitHubPackages" url = 'https://maven.pkg.github.com/josephearl/result' credentials { username = System.getenv('GITHUB_ACTOR') password = System.getenv('GITHUB_TOKEN') } } + maven { + name = "MavenCentral" + url = "https://central.sonatype.com/" + credentials { + username = System.getenv("MAVEN_USERNAME") + password = System.getenv("MAVEN_PASSWORD") + } + } } } From 25f9c5325818045d0a54119258799e5d5e1769c1 Mon Sep 17 00:00:00 2001 From: Joseph Earl Date: Tue, 19 Mar 2024 21:46:09 +0000 Subject: [PATCH 2/6] Add signing plugin --- build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index a3898ae..70e0623 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ import com.github.spotbugs.snom.SpotBugsTask plugins { id 'java-library' id 'maven-publish' + id 'signing' id 'io.freefair.lombok' version '8.6' id 'com.diffplug.spotless' version '6.25.0' id 'com.github.spotbugs' version '6.0.8' @@ -96,3 +97,7 @@ publishing { } } } + +signing { + sign publishing.publications.mavenJava +} From 79d3b36609a855a9ef1f8772f8224405fdcaa049 Mon Sep 17 00:00:00 2001 From: Joseph Earl Date: Tue, 19 Mar 2024 22:03:43 +0000 Subject: [PATCH 3/6] Add required metadata --- build.gradle | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/build.gradle b/build.gradle index 70e0623..7676cc9 100644 --- a/build.gradle +++ b/build.gradle @@ -76,8 +76,33 @@ publishing { publications { mavenJava(MavenPublication) { from components.java + + pom { + name = 'Result' + description = 'Handle errors gracefully in a type-safe, functional manner similar to Kotlin\'s Result type or Scala\'s Try type using Java sealed classes' + url = 'https://github.com/josephearl/result' + licenses { + license { + name = 'The Apache License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id = 'josephearl' + name = 'Joseph Earl' + email = 'hello@josephearl.co.uk' + } + } + scm { + connection = 'scm:git:https://github.com/josephearl/result.git' + developerConnection = 'scm:git:ssh://github.com:josephearl/result.git' + url = 'https://github.com/josephearl/result' + } + } } } + repositories { maven { name = "GitHubPackages" From 1a5120317803ffb45708f5bdcedc6d96d4c0a039 Mon Sep 17 00:00:00 2001 From: Joseph Earl Date: Tue, 19 Mar 2024 22:05:52 +0000 Subject: [PATCH 4/6] Change group --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7676cc9..7c44ac0 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { id 'com.github.spotbugs' version '6.0.8' } -group 'io.github.josephearl.result' +group 'io.github.josephearl' version '1.0.0-SNAPSHOT' repositories { From bb08fe6dde5d78c7d26bdd375c5b8f54f624dfe5 Mon Sep 17 00:00:00 2001 From: Joseph Earl Date: Tue, 19 Mar 2024 22:08:56 +0000 Subject: [PATCH 5/6] Simplify metadata --- build.gradle | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.gradle b/build.gradle index 7c44ac0..9c55dda 100644 --- a/build.gradle +++ b/build.gradle @@ -89,14 +89,10 @@ publishing { } developers { developer { - id = 'josephearl' name = 'Joseph Earl' - email = 'hello@josephearl.co.uk' } } scm { - connection = 'scm:git:https://github.com/josephearl/result.git' - developerConnection = 'scm:git:ssh://github.com:josephearl/result.git' url = 'https://github.com/josephearl/result' } } From 3adff0f6ca32efcaaf0228008a34dd84fc146f80 Mon Sep 17 00:00:00 2001 From: Joseph Earl Date: Tue, 19 Mar 2024 22:11:27 +0000 Subject: [PATCH 6/6] Addd more developer metadata --- build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index 9c55dda..c242a74 100644 --- a/build.gradle +++ b/build.gradle @@ -89,7 +89,9 @@ publishing { } developers { developer { + id = 'josephearl' name = 'Joseph Earl' + url = 'https://github.com/josephearl/result' } } scm {