diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4789211..e5eee58 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,14 +1,8 @@
-# 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:
@@ -16,17 +10,12 @@ jobs:
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
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ba35a9d..8dd89eb 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -4,7 +4,7 @@ on:
release:
types: [released]
tags:
- - 'v[0-9]+.[0-9]+.[0-9]+'
+ - '[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
@@ -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()
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 9a49f1b..a79453b 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -1,8 +1,10 @@
name: Publish to Maven Central
on:
- release:
- types: [prereleased]
+ workflow_dispatch:
+ push:
+ branches:
+ - 'main'
jobs:
build:
diff --git a/.github/workflows/update-dependancy-graph.yml b/.github/workflows/update-dependancy-graph.yml
index f61cdcc..f7d4e09 100644
--- a/.github/workflows/update-dependancy-graph.yml
+++ b/.github/workflows/update-dependancy-graph.yml
@@ -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
diff --git a/build.gradle.kts b/build.gradle.kts
index 9b32712..d5326bf 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -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)
}
@@ -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"
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 44cae2b..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
- 4.0.0
-
- dev.koifysh
- archipelago-client
- 0.1.20-SNAPSHOT
-
- Archipelago Java Library
- Library to connect to an Archipelago Server
- https://github.com/ArchipelagoMW/Java-Client
-
-
-
- MIT License
- https://github.com/ArchipelagoMW/Java-Client/blob/main/LICENSE
- repo
-
-
-
-
- scm:git://github.com/ArchipelagoMW/Java-Client
- scm:git:https://github.com/ArchipelagoMW/Java-Client.git
- https://github.com/ArchipelagoMW/Java-Client
- archipelago-client-0.1.20
-
-
-
-
- Kono Tyran
- Kono@koifysh.dev
-
-
- mattman107
-
-
-
-
- 8
- 8
- UTF-8
-
-
-
-
- org.java-websocket
- Java-WebSocket
- 1.6.0
-
-
- com.google.code.gson
- gson
- 2.13.1
-
-
- org.apache.httpcomponents.client5
- httpclient5
- 5.4.4
-
-
- org.apache.httpcomponents.core5
- httpcore5
- 5.3.4
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-release-plugin
- 3.1.1
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 3.3.1
-
-
- attach-sources
-
- jar-no-fork
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 3.8.0
-
-
- attach-javadocs
-
- jar
-
-
-
-
- none
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
- 3.2.4
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
- org.sonatype.central
- central-publishing-maven-plugin
- 0.5.0
- true
-
- central
- true
-
-
-
-
-
-
\ No newline at end of file
diff --git a/readme.md b/readme.md
index 935525b..84f2fdd 100644
--- a/readme.md
+++ b/readme.md
@@ -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'
-```
\ No newline at end of file
+```
+
+## 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 section:
+
+```xml
+
+
+ Central Portal Snapshots
+ central-portal-snapshots
+ https://central.sonatype.com/repository/maven-snapshots/
+
+ false
+
+
+ true
+
+
+
+```
+
+And add the snapshot version into your dependencies:
+
+```xml
+
+ io.github.archipelagomw
+ Java-Client
+ 0.1.20-SNAPSHOT
+
+```
+
+
+### 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'
+```