Skip to content

Commit f2a0fa3

Browse files
authored
Update release commands in README files (#5227)
Per [b/294577585](https://b.corp.google.com/issues/294577585), This updates any references to our previous release commands to now represent the new process; including the removal of the barebones `publishAll`. Additionally, this fixes the following: - [b/294577524](https://b.corp.google.com/issues/294577524) -> Add a default name for releases when using commands - [b/294578506](https://b.corp.google.com/issues/294578506) -> Add a link to our contributor documentation in our buildSrc README NO_RELEASE_CHANGE
1 parent c10cd5b commit f2a0fa3

File tree

5 files changed

+36
-37
lines changed

5 files changed

+36
-37
lines changed

README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -225,30 +225,21 @@ strategy](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Resolutio
225225

226226
### Commands
227227

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

233232
```bash
234-
./gradlew publishAllToLocal
233+
# e.g. to publish Firestore and Functions
234+
./gradlew -PprojectsToPublish="firebase-firestore,firebase-functions" \
235+
publishReleasingLibrariesToMavenLocal
235236
```
236237

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

242-
For more advanced use cases where developers wish to make changes to a project,
243-
but have transitive dependencies point to publicly released versions, individual
244-
projects may be published as follows.
245-
246-
```bash
247-
# e.g. to publish Firestore and Functions
248-
./gradlew -PprojectsToPublish=":firebase-firestore,:firebase-functions" \
249-
publishProjectsToMavenLocal
250-
```
251-
252243
### Code Formatting
253244

254245
#### Java

buildSrc/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Build Source
22

3+
> [!NOTE]
4+
> Eventually, this will be merged with our [contributor documentation](https://firebase.github.io/firebase-android-sdk/).
5+
36
This file will be more organized as time progresses. Because a lot of our
47
plugins and systems require a moderate amount of cognitive overhead to understand,
58
I thought it best to provide documentation for such systems. You can find the

buildSrc/src/main/java/com/google/firebase/gradle/plugins/PublishingPlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ abstract class PublishingPlugin : Plugin<Project> {
191191
allFirebaseLibraries: List<FirebaseLibraryExtension>
192192
): ReleaseMetadata? {
193193
val projectsToPublish = project.provideProperty<String>("projectsToPublish").orNull
194-
val releaseName = project.provideProperty<String>("releaseName").orNull
194+
val releaseName = project.provideProperty<String>("releaseName").orNull ?: "NO_NAME"
195195

196-
if (projectsToPublish == null || releaseName == null) return null
196+
if (projectsToPublish == null) return null
197197

198198
val projectNames = projectsToPublish.split(",")
199199
val librariesToRelease =

firebase-firestore/README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,10 @@ from within Android Studio.
9999

100100
## Build Local Jar of Firestore SDK
101101

102-
Run:
103102
```bash
104-
./gradlew publishAllToLocal
103+
./gradlew -PprojectsToPublish="firebase-firestore" publishReleasingLibrariesToMavenLocal
105104
```
106105

107-
This will publish firebase SDK at SNAPSHOT versions. All pom level dependencies
108-
within the published artifacts will also point to SNAPSHOT versions that are
109-
co-published. The results will be built into your local maven repo.
110-
111106
Developers may then take a dependency on these locally published versions by adding
112107
the `mavenLocal()` repository to your [repositories
113108
block](https://docs.gradle.org/current/userguide/declaring_repositories.html) in

firebase-perf/README.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,28 +84,38 @@ firebase-android-sdk$ ./gradlew :firebase-perf:deviceCheck
8484

8585
### Creating a Release Candidate
8686

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

91-
### Publish project locally
89+
```properties
90+
version=20.4.1-SNAPSHOT
91+
```
9292

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

98-
```
99-
firebase-android-sdk$ ./gradlew publishAllToLocal
95+
```bash
96+
# firebase-perf requires firebase-sessions
97+
./gradlew -PprojectsToPublish="firebase-perf,firebase-sessions" firebasePublish
10098
```
10199

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

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

108-
The location of published project `~/.m2/repository/com/google/firebase/`.
109+
### Publish project locally
110+
111+
You can publish the project directly to your [local maven](https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:maven_local)
112+
repository like so:
113+
114+
```bash
115+
# firebase-perf requires firebase-sessions
116+
./gradlew -PprojectsToPublish="firebase-perf,firebase-sessions" \
117+
publishReleasingLibrariesToMavenLocal
118+
```
109119

110120
### Read SDK from mavenLocal()
111121

0 commit comments

Comments
 (0)