Skip to content

Commit

Permalink
updating project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jkyberneees committed Nov 30, 2024
1 parent b2c27db commit 0002fad
Show file tree
Hide file tree
Showing 25 changed files with 38 additions and 39 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ jobs:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Add the following dependency to your `pom.xml`:

```xml
<dependency>
<groupId>de.n21no.realtime.pubsub</groupId>
<artifactId>core</artifactId>
<groupId>de.backendstack21</groupId>
<artifactId>realtime-pubsub</artifactId>
<version>1.0.0</version>
</dependency>
```
Expand All @@ -35,7 +35,7 @@ Add the following dependency to your `pom.xml`:
Add the following to your `build.gradle` dependencies:

```kt
implementation 'de.n21no.realtime.pubsub:core:1.0.0'
implementation 'de.backendstack21:realtime-pubsub:1.0.0'
```

**Dependencies**:
Expand Down Expand Up @@ -67,16 +67,14 @@ implementation 'de.n21no.realtime.pubsub:core:1.0.0'

## Getting Started

This guide will help you set up and use the `realtime-pubsub-client` library in your Java project.

### Connecting to the Server

First, import the `RealtimeClient` class and create a new instance with the required configuration:

```java
import de.n21no.realtime.pubsub.RealtimeClient;
import de.n21no.realtime.pubsub.RealtimeClientConfig;
import de.n21no.realtime.pubsub.ConnectionInfo;
import de.backendstack21.realtime.pubsub.RealtimeClient;
import de.backendstack21.realtime.pubsub.RealtimeClientConfig;
import de.backendstack21.realtime.pubsub.ConnectionInfo;

public class ClientDemo {
public static void main(String[] args) {
Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ publishing {
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/BackendStack21/realtime-pubsub-client-java")
name = "MavenCentral"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME_GITHUB") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN_GITHUB") ?: System.getenv("GITHUB_TOKEN")
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

/**
* A functional interface for event listeners.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

public enum PresenceStatus {
CONNECTED("connected"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import java.io.IOException;
import java.net.URI;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

/**
* Configuration class for RealtimeClient.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

/**
* A functional interface for reply functions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeoutException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/samples/ClientDemoExtended.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package samples;

import de.n21no.realtime.pubsub.*;
import de.backendstack21.realtime.pubsub.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/samples/ClientDemoMinimal.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package samples;

import de.n21no.realtime.pubsub.IncomingMessage;
import de.n21no.realtime.pubsub.RealtimeClient;
import de.n21no.realtime.pubsub.RealtimeClientConfig;
import de.n21no.realtime.pubsub.ReplyFunction;
import de.backendstack21.realtime.pubsub.IncomingMessage;
import de.backendstack21.realtime.pubsub.RealtimeClient;
import de.backendstack21.realtime.pubsub.RealtimeClientConfig;
import de.backendstack21.realtime.pubsub.ReplyFunction;

import java.util.Map;
import java.util.logging.Logger;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/samples/rpc/Client.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package samples.rpc;

import de.n21no.realtime.pubsub.RealtimeClient;
import de.n21no.realtime.pubsub.RealtimeClientConfig;
import de.backendstack21.realtime.pubsub.RealtimeClient;
import de.backendstack21.realtime.pubsub.RealtimeClientConfig;

import java.util.logging.Logger;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/samples/rpc/Server.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package samples.rpc;

import de.n21no.realtime.pubsub.*;
import de.backendstack21.realtime.pubsub.*;

import java.util.Date;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import jakarta.websocket.*;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.n21no.realtime.pubsub;
package de.backendstack21.realtime.pubsub;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down

0 comments on commit 0002fad

Please sign in to comment.