File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,26 @@ implementation("io.ably:ably-java:$ABLY_VERSION") {
4747runtimeOnly(" io.ably:network-client-okhttp:$ABLY_VERSION " )
4848```
4949
50+ ### Publishing to local Maven repository for development and testing
51+ To publish the library to your local Maven repository, you can use the following command:
52+
53+ ./gradlew publishToMavenLocal
54+
55+
56+ Alternatively, to publish only the specific (LiveObjects) module:
57+
58+ ./gradlew :live-objects:publishToMavenLocal
59+
60+
61+ - To use the locally published library in your project, you can add the following dependency in your ` build.gradle ` file:
62+
63+ ```
64+ repositories {
65+ mavenLocal()
66+ }
67+ ```
68+ - Note - Place ` mavenLocal() ` before ` mavenCentral() ` for resolution precedence.
69+
5070### How to Add a New Network Engine
5171
5272To add a new network engine, follow these steps:
Original file line number Diff line number Diff line change @@ -30,7 +30,14 @@ subprojects {
3030configure(subprojects) {
3131 pluginManager.withPlugin(" com.vanniktech.maven.publish" ) {
3232 extensions.configure<MavenPublishBaseExtension > {
33- signAllPublications()
33+ // Check if we're running a local publish task
34+ val isLocalPublish = gradle.startParameter.taskNames.any {
35+ it.contains(" publishToMavenLocal" ) || it.contains(" ToMavenLocal" )
36+ }
37+
38+ if (! isLocalPublish) {
39+ signAllPublications()
40+ }
3441 }
3542 }
3643}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
33plugins {
44 `java- library`
55 alias(libs.plugins.kotlin.jvm)
6+ alias(libs.plugins.maven.publish)
67}
78
89repositories {
You can’t perform that action at this time.
0 commit comments