From 379370a48ac7fcebaa0d82b1a2586006aea373ed Mon Sep 17 00:00:00 2001
From: Lenni0451 <20379977+Lenni0451@users.noreply.github.com>
Date: Thu, 16 Nov 2023 18:19:12 +0100
Subject: [PATCH] Publish to maven central
---
README.MD | 13 ++-----------
build.gradle | 11 +++++++++++
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/README.MD b/README.MD
index 00951a9..27178ce 100644
--- a/README.MD
+++ b/README.MD
@@ -2,17 +2,14 @@
A java library with many useful functions and classes.\
The idea is to put similar classes and utils into one subpackage category like `network` or `collections`.\
When there are enough utils in one category, they will be moved into a separate module.
-I will keep the package structure, so you only have to add a new module to your project.\
-If you want to avoid this, you can depend on the `all` module, which contains all other modules.
+I will keep the package structure, so you only have to add a new module to your project.
## Usage
To use `commons` in your project, you have the following options:
### Gradle
````groovy
repositories {
- maven {
- url "https://maven.lenni0451.net/releases"
- }
+ mavenCentral()
}
dependencies {
@@ -24,12 +21,6 @@ Or the [snapshot server](https://maven.lenni0451.net/#/snapshots/net/lenni0451/c
### Maven
````xml
-
- lenni0451-maven-releases
- Lenni0451 Maven Repository
- https://maven.lenni0451.net/releases
-
-
net.lenni0451.commons
all
diff --git a/build.gradle b/build.gradle
index 191e970..0006b98 100644
--- a/build.gradle
+++ b/build.gradle
@@ -58,6 +58,17 @@ subprojects {
def snapshotsUrl = "https://maven.lenni0451.net/snapshots"
url = project.maven_version.endsWith("SNAPSHOT") ? snapshotsUrl : releasesUrl
+ credentials(PasswordCredentials)
+ authentication {
+ basic(BasicAuthentication)
+ }
+ }
+ maven {
+ name = "ossrh"
+ def releasesUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
+ def snapshotsUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
+ url = project.maven_version.endsWith("SNAPSHOT") ? snapshotsUrl : releasesUrl
+
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)