Skip to content

Commit 3c4413e

Browse files
committed
[ECO-5383] Fixed build script to enable local maven publish
1 parent c4f1f1c commit 3c4413e

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ implementation("io.ably:ably-java:$ABLY_VERSION") {
4747
runtimeOnly("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+
```bash
54+
./gradlew publishToMavenLocal
55+
```
56+
5057
### How to Add a New Network Engine
5158

5259
To add a new network engine, follow these steps:

build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@ subprojects {
3030
configure(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
}

live-objects/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
33
plugins {
44
`java-library`
55
alias(libs.plugins.kotlin.jvm)
6+
alias(libs.plugins.maven.publish)
67
}
78

89
repositories {

0 commit comments

Comments
 (0)