-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement centralized config for Release Note generation (#6099)
Per [b/352342089](https://b.corp.google.com/issues/352342089), This implements a new extension through `FirebaseLibrary` called `ReleaseNotesConfigurationExtension`. This can be configured through the `releaseNotes` helper method that takes an `Action` argument; similar to what we do with `FirebaseTestLabExtension` and `FirebaseStaticAnalysis`. The goal of this move is to not only allow teams to modify their release notes metadata, but provide an obvious indicator of release note configuration that must be changed to properly generate release notes. This way, we avoid accidentally _not_ generating release notes for libraries that should otherwise have them. Furthermore, this opens the door for exposing more release note configurations to product teams (such as `annotationsNotToDisplay`, `suppressedFiles`, `includedHeadTagsPath`, `package-list` mappings, etc.,). NO_RELEASE_CHANGE
- Loading branch information
Showing
63 changed files
with
288 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...rc/src/main/java/com/google/firebase/gradle/plugins/ReleaseNotesConfigurationExtension.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.firebase.gradle.plugins | ||
|
||
import org.gradle.api.provider.Property | ||
|
||
/** | ||
* Configuration options for release note generation of libraries. | ||
* | ||
* Also facilitates the centralization of certain externally defined data (usually defined on G3). | ||
* As we can't link G3 files on GitHub, if you're setting up a new SDK and are unsure what release | ||
* note mappings your SDK has (or will have) ask Rachel or the ACore team for the relevant variable | ||
* mappings. | ||
* | ||
* @property enabled Whether to generate release notes for this library. Defaults to true. | ||
* | ||
* @property name The variable name mapping for this library, defined on G3. | ||
* | ||
* @property versionName The version name mapping for this library, defined on G3. | ||
* | ||
* @property hasKTX The library has a sub module with the suffix '-ktx' that releases alongside this | ||
* library, and should have the transitive text added to the release notes. Defaults to true. Will | ||
* likely be removed when we officially drop KTX libraries. | ||
* | ||
* @property artifactName The name of the generation artifact. _Only_ required if your project's | ||
* name is different than your generated artifact name. Defaults to the project name. | ||
* | ||
* @see MakeReleaseNotesTask | ||
*/ | ||
abstract class ReleaseNotesConfigurationExtension { | ||
abstract val enabled: Property<Boolean> | ||
abstract val name: Property<String> | ||
abstract val versionName: Property<String> | ||
abstract val hasKTX: Property<Boolean> | ||
abstract val artifactName: Property<String> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.