Skip to content

Commit

Permalink
Improve release CI and overhaul README.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Dec 24, 2023
1 parent e6bc8c0 commit c23a7bd
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Gradle Publish
uses: gradle/gradle-build-action@v2
with:
arguments: publish publishToSonatype closeSonatypeStagingRepository --stacktrace
arguments: publish publishToSonatype closeAndReleaseSonatypeStagingRepository --stacktrace
env:
ACTIONS_REF: ${{ github.ref }}
ORG_GRADLE_PROJECT_mavenCentralKey: ${{ secrets.MAVEN_CENTRAL_PUBLISH_KEY }}
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,36 @@
![Version](https://img.shields.io/github/v/tag/YumiProject/yumi-commons?label=version&style=flat-square)

A set of common utilities to use as libraries.

## Usage

The libraries are hosted on Maven Central, which means they can be added through the `dev.yumi.commons:yumi-commons` Maven coordinates.

Specific modules can be found as `dev.yumi.commons:yumi-commons-<library>`.

### Gradle

Via a `libs.versions.toml` file:

```toml
[versions]
yumi-commons = "<version>"

[libraries]
yumi-commons = { module = "dev.yumi.commons:yumi-commons", version.ref = "yumi-commons" }
yumi-commons-core = { module = "dev.yumi.commons:yumi-commons-core", version.ref = "yumi-commons" }
yumi-commons-collections = { module = "dev.yumi.commons:yumi-commons-collections", version.ref = "yumi-commons" }
yumi-commons-event = { module = "dev.yumi.commons:yumi-commons-event", version.ref = "yumi-commons" }
```

Then in the Gradle buildscript:

```kotlin
dependencies {
implementation(libs.yumi.commons) // If using the whole bundle

implementations(libs.yumi.commons.core)
implementations(libs.yumi.commons.collections)
implementations(libs.yumi.commons.event)
}
```
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
base.archivesName = "yumi-commons"

configure<ModuleExtension> {
description = "The Yumi Commons libraries providing various utilities."
description = "Yumi Commons is a set of libraries providing various utilities."
}

tasks.check.get().dependsOn(tasks.register<CheckActionsRefTask>("checkActions"))
Expand Down Expand Up @@ -62,6 +62,7 @@ project(":libraries").subprojects {
dependencies {
api(rootProject.libs.jetbrains.annotations)

implementation("org.sonatype.central:central-publishing-maven-plugin:0.1.6")
// Use JUnit Jupiter for testing.
testImplementation(rootProject.libs.junit.jupiter)
testRuntimeOnly(rootProject.libs.junit.launcher)
Expand Down
2 changes: 1 addition & 1 deletion libraries/event/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

configure<ModuleExtension> {
description = "A event framework designed to be flexible and easy to use."
description = "An event framework designed to be flexible and easy to use."
}

dependencies {
Expand Down

0 comments on commit c23a7bd

Please sign in to comment.