Skip to content
Merged
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
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@ implementation("io.ably:ably-java:$ABLY_VERSION") {
runtimeOnly("io.ably:network-client-okhttp:$ABLY_VERSION")
```

### Publishing to local Maven repository for development and testing
To publish the library to your local Maven repository, you can use the following command:

./gradlew publishToMavenLocal


Alternatively, to publish only the specific (LiveObjects) module:

./gradlew :live-objects:publishToMavenLocal


- To use the locally published library in your project, you can add the following dependency in your `build.gradle` file:

```
repositories {
mavenLocal()
}
```
- Note - Place `mavenLocal()` before `mavenCentral()` for resolution precedence.

### How to Add a New Network Engine

To add a new network engine, follow these steps:
Expand Down
9 changes: 8 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ subprojects {
configure(subprojects) {
pluginManager.withPlugin("com.vanniktech.maven.publish") {
extensions.configure<MavenPublishBaseExtension> {
signAllPublications()
// Check if we're running a local publish task
val isLocalPublish = gradle.startParameter.taskNames.any {
it.contains("publishToMavenLocal") || it.contains("ToMavenLocal")
}

if (!isLocalPublish) {
signAllPublications()
}
}
}
}
1 change: 1 addition & 0 deletions live-objects/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
plugins {
`java-library`
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.maven.publish)
}

repositories {
Expand Down
Loading