Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a skip.signing parameter for local publishing #306

Merged
merged 2 commits into from
Oct 22, 2024
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
6 changes: 6 additions & 0 deletions android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ Set your API key in `local.properties` to run the demo app:
```properties
stadiaApiKey=YOUR-API-KEY
```

## Testing locally in a separate project

* Bump the version number to a `SNAPSHOT` in `build.gradle`.
* run `./gradlew publishToMavenLocal -Pskip.signing`
* reference the updated version number in the project, and ensure that `mavenLocal` is one of the `repositories`.
4 changes: 4 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ plugins {
alias libs.plugins.kotlinSerialization apply false
}

ext {
SKIP_SIGNING_PROPERTY = "skip.signing"
}

allprojects {
group = "com.stadiamaps.ferrostar"
version = "0.18.0"
Expand Down
4 changes: 3 additions & 1 deletion android/composeui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ dependencies {

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry to add more repetition here - at some point we should move this to a convention plugin and just apply it once so everyone gets it automatically.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, makes sense... Maven local publishing has always been weird :/

signAllPublications()
if (!project.hasProperty(SKIP_SIGNING_PROPERTY)) {
signAllPublications()
}

configure(new AndroidSingleVariantLibrary("release", true, true))

Expand Down
4 changes: 3 additions & 1 deletion android/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ android.libraryVariants.all { variant ->

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
if (!project.hasProperty(SKIP_SIGNING_PROPERTY)) {
signAllPublications()
}

configure(new AndroidSingleVariantLibrary("release", true, true))

Expand Down
4 changes: 3 additions & 1 deletion android/google-play-services/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ dependencies {

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
if (!project.hasProperty(SKIP_SIGNING_PROPERTY)) {
signAllPublications()
}

configure(new AndroidSingleVariantLibrary("release", true, true))

Expand Down
5 changes: 4 additions & 1 deletion android/maplibreui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ dependencies {

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()

if (!project.hasProperty(SKIP_SIGNING_PROPERTY)) {
signAllPublications()
}

configure(new AndroidSingleVariantLibrary("release", true, true))

Expand Down
4 changes: 4 additions & 0 deletions guide/src/dev-env-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ cargo install cargo-ndk
4. Open the Gradle workspace ('android/') in Android Studio.
Gradle builds automatically ensure the core is built,
so there are no funky scripts needed as on iOS.
5. (Optional) If you want to use Maven local publishing to test...
- Bump the version number to a `SNAPSHOT` in `build.gradle`.
- run `./gradlew publishToMavenLocal -Pskip.signing`.
- Reference the updated version number in the project, and ensure that `mavenLocal` is one of the `repositories`.

#### PR checklist

Expand Down
Loading