Skip to content
Draft
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
4 changes: 2 additions & 2 deletions .github/workflows/emulate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
arch: ${{ steps.get-avd-arch.outputs.arch }}
target: default
# Print emulator logs if tests fail
script: ./gradlew :android:connectedAndroidTest ${{ matrix.android-api-level == 19 && '-PhttpURLConnection' || '' }} || (adb logcat -d System.out:I && exit 1)
script: ./gradlew :core-android:connectedAndroidTest ${{ matrix.android-api-level == 19 && '-PhttpURLConnection' || '' }} || (adb logcat -d System.out:I && exit 1)

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: android-build-reports-${{ matrix.android-api-level }}
path: android/build/reports/
path: core-android/build/reports/
12 changes: 6 additions & 6 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3

- run: ./gradlew :java:testRestSuite -PhttpURLConnection
- run: ./gradlew :core:testRestSuite -PhttpURLConnection

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: java-build-reports-rest
path: java/build/reports/
path: core/build/reports/

check-realtime-httpurlconnection:
runs-on: ubuntu-latest
Expand All @@ -54,13 +54,13 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3

- run: ./gradlew :java:testRealtimeSuite -PhttpURLConnection
- run: ./gradlew :core:testRealtimeSuite -PhttpURLConnection

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: java-build-reports-realtime
path: java/build/reports/
path: core/build/reports/
check-rest-okhttp:
runs-on: ubuntu-latest
permissions:
Expand All @@ -80,7 +80,7 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3

- run: ./gradlew :java:testRestSuite
- run: ./gradlew :core:testRestSuite

check-realtime-okhttp:
runs-on: ubuntu-latest
Expand All @@ -101,7 +101,7 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3

- run: ./gradlew :java:testRealtimeSuite
- run: ./gradlew :core:testRealtimeSuite

check-liveobjects:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ jobs:
- name: Upload Documentation
uses: ably/sdk-upload-action@4e694297f208b72b5a9f6b1248a1556f19f821d6 # v2
with:
sourcePath: java/build/docs/javadoc
sourcePath: core/build/docs/javadoc
githubToken: ${{ secrets.GITHUB_TOKEN }}
artifactName: javadoc
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Ensure you have added suitable tests and the test suite is passing(`./gradlew java:testRestSuite java:testRealtimeSuite android:connectedAndroidTest`)
4. Ensure you have added suitable tests and the test suite is passing(`./gradlew core:testRestSuite core:testRealtimeSuite core-android:connectedAndroidTest`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create a new Pull Request

Expand All @@ -23,11 +23,11 @@ but on Windows there is a batch file:

The JRE-specific library JAR is built with:

./gradlew java:jar
./gradlew core:jar

The Android-specific library AAR is built with:

./gradlew android:assemble
./gradlew core-android:assemble

(The `ANDROID_HOME` environment variable must be set appropriately.)

Expand Down Expand Up @@ -186,9 +186,9 @@ but on Windows there is a batch file:
Tests are based on JUnit, and there are separate suites for the REST and Realtime libraries, with gradle tasks
for the JRE-specific library:

./gradlew java:testRestSuite
./gradlew core:testRestSuite

./gradlew java:testRealtimeSuite
./gradlew core:testRealtimeSuite

To run tests against a specific host, specify in the environment:

Expand All @@ -199,12 +199,12 @@ Tests will run against the sandbox environment by default.
Tests can be run on the Android-specific library. An Android device must be connected,
either a real device or the Android emulator.

./gradlew android:connectedAndroidTest
./gradlew core-android:connectedAndroidTest

We also have a small, fledgling set of unit tests which do not communicate with Ably's servers.
The plan is to expand this collection of tests in due course:

./gradlew java:runUnitTests
./gradlew core:runUnitTests

### Interactive push tests

Expand All @@ -225,7 +225,7 @@ signing.keyId=XXXXXXXX
signing.password=ably-debug-key
signing.secretKeyRingFile=/Users/username/.ably/ably-java-secring.gpg
```
- Run `./gradlew android:assembleRelease` or `./gradlew android:assembleDebug`.
- Run `./gradlew core-android:assembleRelease` or `./gradlew core-android:assembleDebug`.

## Using `ably-java` / `ably-android` locally in other projects

Expand Down Expand Up @@ -262,7 +262,7 @@ This library uses [semantic versioning](http://semver.org/). For each release, t

If you've not configured the signing key in your [Gradle properties](https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties) then release builds will complain:

Cannot perform signing task ':java:signArchives' because it has no configured signatory
Cannot perform signing task ':core:signArchives' because it has no configured signatory

You need to [configure Signatory credentials](https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials), for example via the `gradle.properties` file in your `GRADLE_USER_HOME` folder (usually `~/.gradle`).

Expand Down
4 changes: 0 additions & 4 deletions android/gradle.properties

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions core-android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
POM_ARTIFACT_ID=core-android
POM_NAME=Ably Pub/Sub core (Android)
POM_DESCRIPTION=Internal implementation artifact for Ably's own Pub/Sub device/server packages. Not intended for direct use: depend on io.ably.pubsub:device instead.
POM_PACKAGING=aar
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions core/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
POM_ARTIFACT_ID=core
POM_NAME=Ably Pub/Sub core (JVM)
POM_DESCRIPTION=Internal implementation artifact for Ably's own Pub/Sub device/server packages. Not intended for direct use: depend on io.ably.pubsub:server (JVM) or io.ably.pubsub:device (Android) instead.
POM_PACKAGING=jar
2 changes: 1 addition & 1 deletion examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ dependencies {
implementation(libs.ktor.client.cio)
implementation(project(":liveobjects"))

implementation(project(":android"))
implementation(project(":core-android"))

implementation(libs.navigation.compose)

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=io.ably
VERSION_NAME=1.8.0
GROUP=io.ably.pubsub
VERSION_NAME=2.0.0
POM_INCEPTION_YEAR=2015
POM_URL=https://github.com/ably/ably-java
POM_SCM_URL=https://github.com/ably/ably-java/
Expand Down
4 changes: 0 additions & 4 deletions java/gradle.properties

This file was deleted.

4 changes: 2 additions & 2 deletions liveobjects/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ repositories {
}

dependencies {
compileOnly(project(":java"))
compileOnly(project(":core"))
implementation(libs.bundles.common)
implementation(libs.coroutine.core)

testImplementation(project(":java"))
testImplementation(project(":core"))
testImplementation(kotlin("test"))
testImplementation(libs.bundles.kotlin.tests)
}
Expand Down
4 changes: 2 additions & 2 deletions pubsub-adapter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ kotlin {
}

dependencies {
compileOnly(project(":java"))
compileOnly(project(":core"))
testImplementation(kotlin("test"))
testImplementation(project(":java"))
testImplementation(project(":core"))
testImplementation(libs.nanohttpd)
testImplementation(libs.coroutine.core)
testImplementation(libs.coroutine.test)
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pluginManagement {

rootProject.name = "ably-java"

include("java")
include("android")
include("core")
include("core-android")
include("gradle-lint")
include("network-client-core")
include("network-client-default")
Expand Down
2 changes: 1 addition & 1 deletion uts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ everything lives under `uts/src/test/`.
plugins { alias(libs.plugins.kotlin.jvm) }

dependencies {
testImplementation(project(":java")) // the SDK under test
testImplementation(project(":core")) // the SDK under test
testImplementation(project(":network-client-core")) // HttpEngine / WebSocketEngine interfaces
testImplementation(kotlin("test"))
testImplementation("org.junit.jupiter:junit-jupiter-params") // @ParameterizedTest / @ValueSource (version from the JUnit BOM)
Expand Down
2 changes: 1 addition & 1 deletion uts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

dependencies {
testImplementation(project(":java"))
testImplementation(project(":core"))
testImplementation(project(":network-client-core"))
// Runtime-only so compile-time stays decoupled from the plugin internals; the LiveObjects test
// helpers reach the internal wire/message classes (e.g. for build_public_object_message) by reflection.
Expand Down
Loading