diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml
new file mode 100644
index 0000000..a3ed3d2
--- /dev/null
+++ b/.github/workflows/changelog.yml
@@ -0,0 +1,18 @@
+name: Update Changelog
+
+on:
+ push:
+ branches: [ master ]
+
+jobs:
+ snapshot:
+ name: Update Snapshot
+ runs-on: ubuntu-latest
+ if: ${{ !contains(github.event.head_commit.message, 'skip-snapshot') }}
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: release-drafter/release-drafter@master
+ id: release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 79367d4..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Release
-
-on:
- release:
- types: [ released ]
-
-jobs:
- build:
- name: Release
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - uses: actions/setup-java@v4
- with:
- distribution: 'adopt'
- java-version: '8'
-
- - uses: arduino/setup-protoc@v1
-
- - uses: actions/cache@v4
- with:
- path: ~/.gradle/caches
- key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}
- restore-keys: |
- ${{ runner.os }}-gradle-
-
- - uses: actions/cache@v4
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}
- restore-keys: |
- ${{ runner.os }}-gradlew-
-
- - uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
- with:
- gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- passphrase: ${{ secrets.GPG_PASSPHRASE }}
-
- - run: |
- [[ "${{ github.event.release.tag_name }}" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1
- chmod +x gradlew
- ./gradlew -Pdev=false publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion="${{ github.event.release.tag_name }}" -Psigning.gnupg.keyName="${{ secrets.GPG_SECRET_KEY_ID }}" -Psigning.gnupg.passphrase="${{ secrets.GPG_PASSPHRASE }}" -PsonatypeUsername="${{ secrets.SONATYPE_USERNAME }}" -PsonatypePassword="${{ secrets.SONATYPE_PASSWORD }}"
diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml
deleted file mode 100644
index 6576551..0000000
--- a/.github/workflows/snapshot-release.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Snapshot Release
-
-on:
- release:
- types: [ published ]
-
-jobs:
- build:
- name: Snapshot Release
- runs-on: ubuntu-latest
- if: "github.event.release.prerelease"
- steps:
- - uses: actions/checkout@v4
-
- - uses: actions/setup-java@v4
- with:
- distribution: 'adopt'
- java-version: '8'
-
- - uses: arduino/setup-protoc@v1
-
- - uses: actions/cache@v4
- with:
- path: ~/.gradle/caches
- key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}
- restore-keys: |
- ${{ runner.os }}-gradle-
-
- - uses: actions/cache@v4
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}
- restore-keys: |
- ${{ runner.os }}-gradlew-
-
- - run: |
- chmod +x gradlew
- ./gradlew build
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
deleted file mode 100644
index 98c834b..0000000
--- a/.github/workflows/snapshot.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-name: Update Snapshot
-
-on:
- push:
- branches: [ master ]
-
-jobs:
- snapshot:
- name: Update Snapshot
- runs-on: ubuntu-latest
- if: ${{ !contains(github.event.head_commit.message, 'skip-snapshot') }}
- steps:
- - uses: actions/checkout@v4
-
- - uses: actions/setup-java@v4
- with:
- distribution: 'adopt'
- java-version: '8'
-
- - uses: arduino/setup-protoc@v1
-
- - uses: actions/cache@v4
- with:
- path: ~/.gradle/caches
- key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}
- restore-keys: |
- ${{ runner.os }}-gradle-
-
- - uses: actions/cache@v4
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}
- restore-keys: |
- ${{ runner.os }}-gradlew-
-
- - uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
- with:
- gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- passphrase: ${{ secrets.GPG_PASSPHRASE }}
-
- - uses: release-drafter/release-drafter@master
- id: release
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - run: |
- [[ "${{ steps.release.outputs.tag_name }}" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1
- chmod +x gradlew
- ./gradlew -Pdev=false publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion="${{ steps.release.outputs.tag_name }}-SNAPSHOT" -Psigning.gnupg.keyName="${{ secrets.GPG_SECRET_KEY_ID }}" -Psigning.gnupg.passphrase="${{ secrets.GPG_PASSPHRASE }}" -PsonatypeUsername="${{ secrets.SONATYPE_USERNAME }}" -PsonatypePassword="${{ secrets.SONATYPE_PASSWORD }}"
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index ce07706..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,643 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GETTERS_AND_SETTERS
- KEEP
-
-
- OVERRIDDEN_METHODS
- KEEP
-
-
-
-
-
-
-
- true
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
-
-
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
- BY_NAME
-
-
-
-
-
- true
-
- BY_NAME
-
-
-
-
-
- true
-
- BY_NAME
-
-
-
-
-
-
- true
- true
-
-
- BY_NAME
-
-
-
-
-
- true
-
- BY_NAME
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- distributionManagement
-
-
-
-
-
-
-
-
-
- dependencyManager
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index 127f806..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 17b09da..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.run/build.run.xml b/.run/build.run.xml
index 9bdb6c5..87e14e1 100644
--- a/.run/build.run.xml
+++ b/.run/build.run.xml
@@ -1,25 +1,24 @@
-
-
-
-
+
+
+
+
-
+
-
-
+
-
+
true
true
false
- false
-
+ false
+
\ No newline at end of file
diff --git a/README.md b/README.md
index bf75d6b..b3845a9 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,12 @@
# agones4j
-![Sonatype Nexus (Releases)](https://img.shields.io/nexus/r/tr.com.infumia/agones4j?label=maven-central&server=https%3A%2F%2Foss.sonatype.org%2F)
-![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/tr.com.infumia/agones4j?label=maven-central&server=https%3A%2F%2Foss.sonatype.org)
+[![](https://jitpack.io/v/infumia/agones4j.svg)](https://jitpack.io/#infumia/agones4j)
## How to Use (Developers)
### Code
```groovy
+repositories {
+ maven("https://jitpack.io/")
+}
+
dependencies {
implementation "io.grpc:grpc-stub:1.47.0"
implementation "io.grpc:grpc-protobuf:1.47.0"
@@ -12,9 +15,7 @@ dependencies {
}
```
```java
-import java.time.Duration;
-
-void agones() {
+ void agones() {
final ExecutorService gameServerWatcherExecutor =
Executors.newSingleThreadExecutor();
final ScheduledExecutorService healthCheckExecutor =
@@ -46,7 +47,6 @@ void agones() {
)
.withHealthCheckerExecutor(healthCheckExecutor)
.build();
-
// Health checking.
// Checks if the executor, delay and period are specified.
if (agones.canHealthCheck()) {
@@ -54,15 +54,12 @@ void agones() {
// Uses the health checker executor and the specified delay and period.
agones.startHealthChecking();
}
-
// Manual health checking.
final StreamObserver requester = agones.healthCheck();
// onNext needs to be called continuously to keep the game server healthy.
requester.onNext(Empty.getDefaultInstance());
-
// Stopping the health checking.
agones.stopHealthChecking();
-
// Game server watching.
// Checks if the executor is specified.
if (agones.canWatchGameServer()) {
@@ -70,7 +67,6 @@ void agones() {
// This will be called when the game server is updated.
System.out.println("Game server updated: " + gameServer));
}
-
agones.allocate();
agones.shutdown();
}
diff --git a/build.gradle.kts b/build.gradle.kts
index a39a16e..de02fbc 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -3,16 +3,9 @@ import com.google.protobuf.gradle.id
plugins {
java
`java-library`
- `maven-publish`
- signing
alias(libs.plugins.protobuf)
- alias(libs.plugins.nexus)
}
-val signRequired = !rootProject.property("dev").toString().toBoolean()
-
-group = "tr.com.infumia"
-
repositories {
mavenCentral()
}
@@ -24,11 +17,6 @@ dependencies {
compileOnlyApi(libs.annotationsapi)
}
-java {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
-}
-
sourceSets {
main {
java {
@@ -91,54 +79,3 @@ tasks {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
-
-publishing {
- publications {
- val publication = create("mavenJava") {
- groupId = project.group.toString()
- artifactId = "agones4j"
- version = project.version.toString()
-
- from(components["java"])
- artifact(tasks["sourcesJar"])
- artifact(tasks["javadocJar"])
- pom {
- name.set("Agones4J")
- description.set("Java wrapper for Agones client SDK.")
- url.set("https://infumia.com.tr/")
- licenses {
- license {
- name.set("MIT License")
- url.set("https://mit-license.org/license.txt")
- }
- }
- developers {
- developer {
- id.set("portlek")
- name.set("Hasan Demirtaş")
- email.set("utsukushihito@outlook.com")
- }
- }
- scm {
- connection.set("scm:git:git://github.com/infumia/agones4j.git")
- developerConnection.set("scm:git:ssh://github.com/infumia/agones4j.git")
- url.set("https://github.com/infumia/agones4j")
- }
- }
- }
-
- signing {
- isRequired = signRequired
- if (isRequired) {
- useGpgCmd()
- sign(publication)
- }
- }
- }
-}
-
-nexusPublishing {
- repositories {
- sonatype()
- }
-}
diff --git a/gradle.properties b/gradle.properties
index 13c6246..368c19e 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,11 +1,5 @@
+name=agones4j
+group=tr.com.infumia
version=1.0.0-SNAPSHOT
-sonatypeUsername=
-sonatypePassword=
-
-signing.gnupg.executable=gpg
-signing.gnupg.keyName=
-signing.gnupg.passphrase=
-dev=true
-
org.gradle.parallel=true
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 98cbf45..5f15c83 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -11,4 +11,3 @@ annotationsapi = { module = "org.apache.tomcat:annotations-api", version = "6.0.
[plugins]
protobuf = { id = "com.google.protobuf", version = "0.9.4" }
-nexus = { id = "io.github.gradle-nexus.publish-plugin", version = "1.3.0" }