Skip to content

Update release commands in README files #5227

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

Merged
merged 4 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,30 +225,21 @@ strategy](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Resolutio

### Commands

The simplest way to publish a project and all its associated dependencies is to
just publish all projects. The following command builds SNAPSHOT dependencies of
all projects. All pom level dependencies within the published artifacts will
also point to SNAPSHOT versions that are co-published.
For more advanced use cases where developers wish to make changes to a project,
but have transitive dependencies point to publicly released versions, individual
projects may be published as follows.

```bash
./gradlew publishAllToLocal
# e.g. to publish Firestore and Functions
./gradlew -PprojectsToPublish="firebase-firestore,firebase-functions" \
publishReleasingLibrariesToMavenLocal
```

Developers may take a dependency on these locally published versions by adding
the `mavenLocal()` repository to your [repositories
block](https://docs.gradle.org/current/userguide/declaring_repositories.html) in
your app module's build.gradle.

For more advanced use cases where developers wish to make changes to a project,
but have transitive dependencies point to publicly released versions, individual
projects may be published as follows.

```bash
# e.g. to publish Firestore and Functions
./gradlew -PprojectsToPublish=":firebase-firestore,:firebase-functions" \
publishProjectsToMavenLocal
```

### Code Formatting

#### Java
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Build Source

> [!NOTE]
> Eventually, this will be merged with our [contributor documentation](https://firebase.github.io/firebase-android-sdk/).

This file will be more organized as time progresses. Because a lot of our
plugins and systems require a moderate amount of cognitive overhead to understand,
I thought it best to provide documentation for such systems. You can find the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ abstract class PublishingPlugin : Plugin<Project> {
allFirebaseLibraries: List<FirebaseLibraryExtension>
): ReleaseMetadata? {
val projectsToPublish = project.provideProperty<String>("projectsToPublish").orNull
val releaseName = project.provideProperty<String>("releaseName").orNull
val releaseName = project.provideProperty<String>("releaseName").orNull ?: "NO_NAME"

if (projectsToPublish == null || releaseName == null) return null
if (projectsToPublish == null) return null

val projectNames = projectsToPublish.split(",")
val librariesToRelease =
Expand Down
7 changes: 1 addition & 6 deletions firebase-firestore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,10 @@ from within Android Studio.

## Build Local Jar of Firestore SDK

Run:
```bash
./gradlew publishAllToLocal
./gradlew -PprojectsToPublish="firebase-firestore" publishReleasingLibrariesToMavenLocal
```

This will publish firebase SDK at SNAPSHOT versions. All pom level dependencies
within the published artifacts will also point to SNAPSHOT versions that are
co-published. The results will be built into your local maven repo.

Developers may then take a dependency on these locally published versions by adding
the `mavenLocal()` repository to your [repositories
block](https://docs.gradle.org/current/userguide/declaring_repositories.html) in
Expand Down
38 changes: 24 additions & 14 deletions firebase-perf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,38 @@ firebase-android-sdk$ ./gradlew :firebase-perf:deviceCheck

### Creating a Release Candidate

```
firebase-android-sdk$ ./gradlew -PpublishMode=SNAPSHOT -PprojectsToPublish="firebase-perf" firebasePublish
```
Change the version field in `gradle.properties` to reflect the RC status:

### Publish project locally
```properties
version=20.4.1-SNAPSHOT
```

The simplest way to publish a project and all its associated dependencies is to just publish all
projects. The following command builds **SNAPSHOT** dependencies of all projects. All pom level
dependencies within the published artifacts will also point to SNAPSHOT versions that are
co-published.
And then generate the library with required libraries:

```
firebase-android-sdk$ ./gradlew publishAllToLocal
```bash
# firebase-perf requires firebase-sessions
./gradlew -PprojectsToPublish="firebase-perf,firebase-sessions" firebasePublish
```

Alternative, publish `firebase-perf` only:
This will generate various files in the root build directory that align with
the release candidates.

Alternatively, you can just build the repository in isolation:
```bash
# firebase-perf requires firebase-sessions
./gradlew -PprojectsToPublish="firebase-perf,firebase-sessions" buildMavenZip
```
firebase-android-sdk$ ./gradlew -PprojectsToPublish=":firebase-perf" publishProjectsToMavenLocal
```

The location of published project `~/.m2/repository/com/google/firebase/`.
### Publish project locally

You can publish the project directly to your [local maven](https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:maven_local)
repository like so:

```bash
# firebase-perf requires firebase-sessions
./gradlew -PprojectsToPublish="firebase-perf,firebase-sessions" \
publishReleasingLibrariesToMavenLocal
```

### Read SDK from mavenLocal()

Expand Down