diff --git a/.github/workflows/upload-http-client-jars.yml b/.github/workflows/upload-http-client-jars.yml index ca5c42fb548..cf049458c79 100644 --- a/.github/workflows/upload-http-client-jars.yml +++ b/.github/workflows/upload-http-client-jars.yml @@ -8,6 +8,8 @@ on: - '.github/workflows/upload-http-client-jars.yml' - 'game-app/domain-data/**' - 'http-clients/**' + - 'lib/java-extras/**' + - 'lib/websocket-client/**' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: @@ -30,6 +32,6 @@ jobs: BUILD_VERSION=$(game-app/run/.build/get-build-version) echo "JAR_VERSION=$BUILD_VERSION" | tee -a $GITHUB_ENV - name: Publish lobby client JAR - run: ./gradlew :http-clients:lobby-client:publish :game-app:domain-data:publish + run: ./gradlew :http-clients:lobby-client:publish :game-app:domain-data:publish :lib:java-extras:publish :lib:websocket-client:publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/lib/java-extras/build.gradle b/lib/java-extras/build.gradle index 6cd5a231667..61d273b1345 100644 --- a/lib/java-extras/build.gradle +++ b/lib/java-extras/build.gradle @@ -1,5 +1,35 @@ +import org.gradle.api.publish.maven.MavenPublication + +plugins { + id 'java-library' + id("maven-publish") +} + +version = System.getenv("JAR_VERSION") + + description = "TripleA library for low-level helper APIs, ie: syntactic sugar" dependencies { testImplementation project(":lib:test-common") } + +publishing { + publications { + maven(MavenPublication) { + artifact(tasks.named(sourceSets.main.jarTaskName)) { + extension 'jar' + } + } + } + repositories { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/triplea-game/triplea" + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } +} diff --git a/lib/websocket-client/build.gradle b/lib/websocket-client/build.gradle index 297a40b9579..2b5c319ebb3 100644 --- a/lib/websocket-client/build.gradle +++ b/lib/websocket-client/build.gradle @@ -1,3 +1,32 @@ +import org.gradle.api.publish.maven.MavenPublication + +plugins { + id 'java-library' + id("maven-publish") +} + +version = System.getenv("JAR_VERSION") + dependencies { implementation project(":lib:java-extras") } + +publishing { + publications { + maven(MavenPublication) { + artifact(tasks.named(sourceSets.main.jarTaskName)) { + extension 'jar' + } + } + } + repositories { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/triplea-game/triplea" + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } +}