Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 11 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# Smoke compile on PR

name: Java CI with Maven

on: [push, pull_request]
on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- run: mkdir staging && cp target/*.jar staging
- uses: actions/upload-artifact@v4
with:
name: Package
path: staging
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Build with Maven
run: ./gradlew assemble
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
release:
types: [released]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
Expand Down Expand Up @@ -35,6 +35,9 @@ jobs:
# The content here needs to be the values of the public and secret key pair
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.gpgPublicKey }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.gpgSecretKey }}
# Overrides the configuration of 'NEVER'
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_RELEASE_DEPLOY_ACTIVE: 'RELEASE'
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SNAPSHOT_DEPLOY_ACTIVE: 'NEVER'
run: ./gradlew jreleaserDeploy
- name: Store JReleaser Logs
if: failure()
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Publish to Maven Central

on:
release:
types: [prereleased]
workflow_dispatch:
push:
branches:
- 'main'

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-dependancy-graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: maven
cache: gradle
- name: Submit Dependency Snapshot
uses: advanced-security/maven-dependency-submission-action@v4
uses: gradle/actions/dependency-submission@v4
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ dependencies {

testRuntimeOnly("org.junit.platform:junit-platform-launcher")

// Gson is indirectly exposed via slotdata helpers
api(libs.gson)
implementation(libs.java.websocket)
implementation(libs.gson)
implementation(libs.httpclient)
implementation(libs.httpcore)
}
Expand Down Expand Up @@ -143,7 +144,7 @@ jreleaser {
maven {
mavenCentral {
register("release-deploy") {
// Turning off releases for testing purposes
// Turning off releases; supposed to be turned on via environment variable
active = Active.NEVER
applyMavenCentralRules = true
url = "https://central.sonatype.com/api/v1/publisher"
Expand Down
130 changes: 0 additions & 130 deletions pom.xml

This file was deleted.

66 changes: 64 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,68 @@ To use maven add this dependency to your `pom.xml`:
### Gradle
To use Gradle add the maven central repository to your repositories list:
then add this to your `dependancy` section
```java
```groovy
implementation 'dev.koifysh:archipelago-client:0.1.19'
```
```

## Using Snapshots
This repository is setup to publish snapshots when new commits hit `main`. If you want
to use the snapshot version you will need to do the following:

### Maven
From [Maven Central Documentation](https://central.sonatype.org/publish/publish-portal-snapshots/#publishing-via-other-methods)

Configure your pom.xml file with the following <repositories> section:

```xml
<repositories>
<repository>
<name>Central Portal Snapshots</name>
<id>central-portal-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
```

And add the snapshot version into your dependencies:

```xml
<dependency>
<groupId>io.github.archipelagomw</groupId>
<artifactId>Java-Client</artifactId>
<version>0.1.20-SNAPSHOT</version>
</dependency>
```


### Gradle

From [Maven Central Documentation](https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-via-gradle)

Configure your `build.gradle` with the following:

```groovy
repositories {
maven {
name = 'Central Portal Snapshots'
url = 'https://central.sonatype.com/repository/maven-snapshots/'

// Only search this repository for the specific dependency
content {
includeModule("io.github.archipelagomw", "Java-Client")
}
}
mavenCentral()
}
```

And add the snapshot version into your dependencies:
```groovy
implementation 'io.github.archipelagomw:Java-Client:0.1.20-SNAPSHOT'
```