Skip to content

Commit

Permalink
Publish to maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenni0451 committed Nov 16, 2023
1 parent 7d66566 commit 379370a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 2 additions & 11 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -24,12 +21,6 @@ Or the [snapshot server](https://maven.lenni0451.net/#/snapshots/net/lenni0451/c

### Maven
````xml
<repository>
<id>lenni0451-maven-releases</id>
<name>Lenni0451 Maven Repository</name>
<url>https://maven.lenni0451.net/releases</url>
</repository>

<dependency>
<groupId>net.lenni0451.commons</groupId>
<artifactId>all</artifactId>
Expand Down
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 379370a

Please sign in to comment.