Skip to content

Commit 62bb475

Browse files
committed
spotless
1 parent 711a02e commit 62bb475

15 files changed

+37
-35
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ fun FirebaseLibraryExtension.resolveAndroidDependencies() =
278278
* This is collected via the [runtimeClasspath][FirebaseLibraryExtension.runtimeClasspath].
279279
*
280280
* @throws RuntimeException if a project level dependency is found that doesn't have
281-
* [FirebaseLibraryExtension]
281+
* [FirebaseLibraryExtension]
282282
*/
283283
// TODO(b/277607560): Remove when Gradle's MavenPublishPlugin adds functionality for aar types
284284
fun FirebaseLibraryExtension.resolveProjectLevelDependencies() =

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ data class ReleaseEntry(
151151
* This exists to provide a means for tooling to create new sections explicitly, versus offering
152152
* default values to [ReleaseEntry]
153153
* - as this could lead to edge case scenarios where empty [ReleaseEntry] instances are
154-
* accidentally created.
154+
* accidentally created.
155155
*/
156156
val Empty = ReleaseEntry(null, ReleaseContent("", emptyList()), null)
157157

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import org.gradle.api.tasks.TaskAction
3030
* [FirebaseLibraryExtension.artifactId], so that the check is version agnostic.
3131
*
3232
* @throws GradleException if any project level dependencies are found that are not included in the
33-
* release
33+
* release
3434
*/
3535
abstract class CheckHeadDependencies : DefaultTask() {
3636
@get:Input abstract val projectsToPublish: ListProperty<FirebaseLibraryExtension>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ fun File.childFile(childPath: String) = File("$path/$childPath")
6969
* newline character.
7070
*
7171
* @param terminateWithNewline Whether to terminate the file with a newline character. Defaults to
72-
* `true`.
72+
* `true`.
7373
* @param block A function that takes a string as input and returns a new string. This function is
74-
* used to transform the lines of the file before they are rewritten.
74+
* used to transform the lines of the file before they are rewritten.
7575
*
7676
* ```
7777
* val file = File("my-file.txt")

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public fun <T> Sequence<T>.takeAll(): Sequence<T> = take(count())
5555
* ```
5656
*
5757
* @throws NoSuchElementException if the [Element] does not have descendant [Element]s with tags
58-
* that match the components of an Artifact string; groupId, artifactId, version.
58+
* that match the components of an Artifact string; groupId, artifactId, version.
5959
*/
6060
fun Element.toArtifactString() =
6161
"${textByTag("groupId")}:${textByTag("artifactId")}:${textByTag("version")}"
@@ -77,7 +77,7 @@ fun Element.toArtifactString() =
7777
* ```
7878
*
7979
* @throws NoSuchElementException if the [Element] does not have descendant [Element]s with tags
80-
* that match the components of an Artifact string; groupId, artifactId, version.
80+
* that match the components of an Artifact string; groupId, artifactId, version.
8181
*/
8282
fun Element.toMavenName() = "${textByTag("groupId")}:${textByTag("artifactId")}"
8383

@@ -145,7 +145,7 @@ fun multiLine(vararg strings: Any?) = strings.joinToString("\n")
145145
*
146146
* @param input the string to search through
147147
* @param startIndex an index to start search with, by default zero. Must be not less than zero and
148-
* not greater than `input.length()`
148+
* not greater than `input.length()`
149149
* @throws RuntimeException if a match is not found
150150
*/
151151
fun Regex.findOrThrow(input: CharSequence, startIndex: Int = 0) =
@@ -201,7 +201,7 @@ fun <T> List<T>.separateAt(index: Int) = slice(0 until index) to slice(index..la
201201
*
202202
* @param regex the [Regex] to use to match against values in this list
203203
* @param transform a callback to call with [MathResults][MatchResult] when matches are found. If
204-
* the [transform] returns null, then the value remains unchanged.
204+
* the [transform] returns null, then the value remains unchanged.
205205
*/
206206
fun List<String>.replaceMatches(regex: Regex, transform: (MatchResult) -> String?) = map {
207207
val newValue = regex.find(it)?.let(transform)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import org.gradle.work.DisableCachingByDefault
3838
* @property releaseNotesFile The output file to write the release notes to
3939
* @property skipMissingEntries Continue the build if the release notes are missing entries
4040
* @throws StopActionException If metadata does not exist for the given project, or there are no
41-
* changes to release
41+
* changes to release
4242
* @see make
4343
*/
4444
@DisableCachingByDefault
@@ -178,7 +178,7 @@ abstract class MakeReleaseNotesTask : DefaultTask() {
178178
* - Look for numbers that will be surrounded by either brackets or parentheses
179179
* - These numbers might be preceded by `GitHub `
180180
* - These numbers might also be followed by parentheses with `//` followed by some text (a
181-
* link)
181+
* link)
182182
* - At the end there might be `{: .external}`
183183
*
184184
* For example:

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ data class PreReleaseVersion(val type: PreReleaseVersionType, val build: Int = 1
8787
*
8888
* @param type a case insensitive string of any [PreReleaseVersionType]
8989
* @param build a string number; gets automatically converted to double digits, and defaults to
90-
* one if blank
90+
* one if blank
9191
* @return a [PreReleaseVersion] created from the string, or null if the string was invalid.
9292
*/
9393
fun fromStringsOrNull(type: String, build: String): PreReleaseVersion? =
@@ -176,7 +176,8 @@ data class ModuleVersion(
176176
* ```
177177
*/
178178
val VERSION_REGEX =
179-
"(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?:\\-\\b)?(?<pre>\\w\\D+)?(?<build>\\B\\d+)?".toRegex()
179+
"(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?:\\-\\b)?(?<pre>\\w\\D+)?(?<build>\\B\\d+)?"
180+
.toRegex()
180181

181182
/**
182183
* Extrapolates the version variables from a provided [String], and turns them into a
@@ -214,7 +215,7 @@ data class ModuleVersion(
214215
* Returns a copy of this [ModuleVersion], with the given [VersionType] increased by one.
215216
*
216217
* @param version the [VersionType] to increase; defaults to the lowest valid version ([pre] else
217-
* [patch]).
218+
* [patch]).
218219
*/
219220
fun bump(version: VersionType? = null) =
220221
version

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ import org.gradle.kotlin.dsl.provideDelegate
3434
* for auditing purposes.
3535
*
3636
* @property changelogFile A [File] to use as the [Changelog]. Defaults to the `CHANGELOG.md` file
37-
* at the project's root.
37+
* at the project's root.
3838
* @property releaseVersion A [ModuleVersion] of what to set the version to. Defaults to the
39-
* project's current version.
39+
* project's current version.
4040
* @see PostReleasePlugin
4141
*/
4242
abstract class MoveUnreleasedChangesTask : DefaultTask() {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@ import org.gradle.kotlin.dsl.register
4848
* - [VALIDATE_POM_TASK][registerValidatePomForReleaseTask]
4949
* - [VALIDATE_PROJECTS_TO_PUBLISH_TASK][registerValidateProjectsToPublishTask]
5050
* - [BUILD_MAVEN_ZIP_TASK] -> Creates a zip file of the contents of
51-
* [PUBLISH_RELEASING_LIBS_TO_BUILD_TASK] [registerPublishReleasingLibrariesToBuildDirTask]
51+
* [PUBLISH_RELEASING_LIBS_TO_BUILD_TASK] [registerPublishReleasingLibrariesToBuildDirTask]
5252
* - [BUILD_KOTLINDOC_ZIP_TASK] -> Creates a zip file of the contents of
53-
* [GENERATE_KOTLINDOC_FOR_RELEASE_TASK] [registerGenerateKotlindocForReleaseTask]
53+
* [GENERATE_KOTLINDOC_FOR_RELEASE_TASK] [registerGenerateKotlindocForReleaseTask]
5454
* - [BUILD_RELEASE_NOTES_ZIP_TASK] -> Creates a zip file of the contents of
55-
* [PREPARE_RELEASE_NOTES_FOR_DROP][registerPrepareReleaseNotesForDropTask]
55+
* [PREPARE_RELEASE_NOTES_FOR_DROP][registerPrepareReleaseNotesForDropTask]
5656
* - [FIREBASE_PUBLISH_TASK] -> Runs all the tasks above
5757
*
5858
* The following are additional tasks provided- that are either for convenience sake, or are used
5959
* outside of the standard [FIREBASE_PUBLISH_TASK] workflow (possibly at a later time in the release
6060
* cycle):
6161
* - [BUILD_BOM_ZIP_TASK] -> Creates a zip file of the contents of [GENERATE_BOM_TASK]
62-
* [registerGenerateBomTask]
62+
* [registerGenerateBomTask]
6363
* - [RELEASE_GENEATOR_TASK][registerGenerateReleaseConfigFilesTask]
6464
* - [RELEASE_REPORT_GENERATOR_TASK][registerGenerateReleaseReportFilesTask]
6565
* - [PUBLISH_RELEASING_LIBS_TO_LOCAL_TASK][registerPublishReleasingLibrariesToMavenLocalTask]

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import org.gradle.api.tasks.TaskAction
4242
*
4343
* @property changesByLibraryName contains libs which have opted into the release, and their changes
4444
* @property changedLibrariesWithNoChangelog contains libs not opted into the release, despite
45-
* having changes
45+
* having changes
4646
*/
4747
@Serializable
4848
data class ReleaseReport(
@@ -183,8 +183,7 @@ abstract class ReleaseGenerator : DefaultTask() {
183183
.setListMode(ListBranchCommand.ListMode.REMOTE)
184184
.call()
185185
.firstOrNull { it.name == "refs/remotes/origin/releases/$branchName" }
186-
?.objectId
187-
?: throw RuntimeException("Could not find branch named $branchName")
186+
?.objectId ?: throw RuntimeException("Could not find branch named $branchName")
188187

189188
private fun getChangedLibraries(
190189
repo: Git,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ import org.gradle.api.provider.Property
3030
* @property name The variable name mapping for this library, defined on G3.
3131
* @property versionName The version name mapping for this library, defined on G3.
3232
* @property hasKTX The library has a sub module with the suffix '-ktx' that releases alongside this
33-
* library, and should have the transitive text added to the release notes. Defaults to true. Will
34-
* likely be removed when we officially drop KTX libraries.
33+
* library, and should have the transitive text added to the release notes. Defaults to true. Will
34+
* likely be removed when we officially drop KTX libraries.
3535
* @property artifactName The name of the generation artifact. _Only_ required if your project's
36-
* name is different than your generated artifact name. Defaults to the project name.
36+
* name is different than your generated artifact name. Defaults to the project name.
3737
* @see MakeReleaseNotesTask
3838
*/
3939
abstract class ReleaseNotesConfigurationExtension {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ import org.gradle.api.tasks.TaskAction
4848
* *Assuming that `17.0.1` is the latest version of `firebase-appcheck-interop`*
4949
*
5050
* @property buildFile A [File] that should be used as the source to update from. Typically the
51-
* `build.gradle` or `build.gradle.kts` file for a given project.
51+
* `build.gradle` or `build.gradle.kts` file for a given project.
5252
* @property outputFile A [File] that should be used to write the new text to. Typically the same as
53-
* the input file ([buildFile]).
53+
* the input file ([buildFile]).
5454
* @see PostReleasePlugin
5555
*/
5656
abstract class UpdatePinnedDependenciesTask : DefaultTask() {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ import org.gradle.kotlin.dsl.provideDelegate
3434
* latest released version.
3535
*
3636
* @property versionFile A [File] that contains the `version` property. Defaults to the
37-
* `gradle.properties` file at the project's root.
37+
* `gradle.properties` file at the project's root.
3838
* @property releasedVersion A [ModuleVersion] of what to bump from. Defaults to the project
39-
* version.
39+
* version.
4040
* @property newVersion A [ModuleVersion] of what to set the version to. Defaults to one patch
41-
* higher than [releasedVersion]
41+
* higher than [releasedVersion]
4242
* @see PostReleasePlugin
4343
*/
4444
abstract class VersionBumpTask : DefaultTask() {

buildSrc/src/test/kotlin/com/google/firebase/gradle/plugins/FirebaseTestController.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import org.junit.rules.TemporaryFolder
3232
* - Link your test projects with the controller via [withProjects]
3333
* - Use the [GradleRunner] to run your build at the [rootDirectory]
3434
* - Use any of the provided extension methods to inspect the build files and make assertions in
35-
* your test
35+
* your test
3636
*
3737
* Some example of the provided extension methods are:
3838
* - [Project.buildFile]
@@ -120,7 +120,7 @@ class FirebaseTestController(val rootDirectory: TemporaryFolder) {
120120
* they are invoked during the build process.
121121
*
122122
* @param projects a variable amount of [Project] to create subdirectories for and include in the
123-
* build process.
123+
* build process.
124124
* @see include
125125
*/
126126
fun withProjects(vararg projects: Project) {

buildSrc/src/test/kotlin/com/google/firebase/gradle/plugins/PublishingPluginTests.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class PublishingPluginTests {
4141
name = "childProject2",
4242
version = "0.9",
4343
projectDependencies = setOf(project1),
44-
customizePom = """
44+
customizePom =
45+
"""
4546
licenses {
4647
license {
4748
name = 'Hello'
@@ -79,7 +80,8 @@ class PublishingPluginTests {
7980
name = "childProject2",
8081
version = "0.9",
8182
projectDependencies = setOf(project1),
82-
customizePom = """
83+
customizePom =
84+
"""
8385
licenses {
8486
license {
8587
name = 'Hello'

0 commit comments

Comments
 (0)