Skip to content

Commit

Permalink
Bump com.diffplug.spotless from 6.11.0 to 6.19.0 (#140)
Browse files Browse the repository at this point in the history
Bumps com.diffplug.spotless from 6.11.0 to 6.19.0.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.diffplug.spotless&package-manager=gradle&previous-version=6.11.0&new-version=6.19.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Philip K. Warren <[email protected]>
  • Loading branch information
dependabot[bot] and pkwarren authored Jul 10, 2023
1 parent 459cb47 commit 04db9d7
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ animalsniffer = "1.5.4"
kotlin = "1.6.20"
pluginPublish = "1.1.0"
publishing = "0.22.0"
spotless = "6.11.0"
spotless = "6.19.0"

# signature
java8Signature = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/build/buf/gradle/ArtifactDetailsSupport.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal fun Project.getArtifactDetails(): ArtifactDetails? {
ArtifactDetails(
it.groupId,
"${it.artifactId}-bufbuild",
it.version
it.version,
)
} ?: publications.size
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/build/buf/gradle/BreakingConfiguration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private fun Project.addSchemaDependency(artifactDetails: ArtifactDetails) {

createConfigurationWithDependency(
BUF_BREAKING_CONFIGURATION_NAME,
"${artifactDetails.groupAndArtifact()}:$versionSpecifier"
"${artifactDetails.groupAndArtifact()}:$versionSpecifier",
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/build/buf/gradle/BreakingTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract class BreakingTask : DefaultTask() {
"breaking",
bufBuildPublicationFile,
"--against",
singleFileFromConfiguration(BUF_BREAKING_CONFIGURATION_NAME)
singleFileFromConfiguration(BUF_BREAKING_CONFIGURATION_NAME),
) {
"""
|Some Protobuf files had breaking changes:
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/build/buf/gradle/BufExtension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ open class BufExtension {
class ArtifactDetails(
var groupId: String? = null,
var artifactId: String? = null,
var version: String? = null
var version: String? = null,
)

class GenerateOptions(
Expand All @@ -86,5 +86,5 @@ class GenerateOptions(
/**
* Specify the location of buf.gen.yaml if not using one in the project root.
*/
var templateFileLocation: File? = null
var templateFileLocation: File? = null,
)
4 changes: 2 additions & 2 deletions src/main/kotlin/build/buf/gradle/BufSupport.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ internal fun Project.configureBufDependency() {
"name" to "buf",
"version" to extension.toolVersion,
"classifier" to "$osPart-$archPart",
"ext" to "exe"
)
"ext" to "exe",
),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ import java.io.File

internal fun Task.execBufInSpecificDirectory(
vararg bufCommand: String,
customErrorMessage: ((String) -> String)? = null
customErrorMessage: ((String) -> String)? = null,
) {
execBufInSpecificDirectory(bufCommand.asList(), emptyList(), customErrorMessage)
}

internal fun Task.execBufInSpecificDirectory(
bufCommand: String,
extraArgs: Iterable<String>,
customErrorMessage: ((String) -> String)
customErrorMessage: ((String) -> String),
) {
execBufInSpecificDirectory(listOf(bufCommand), extraArgs, customErrorMessage)
}

private fun Task.execBufInSpecificDirectory(
bufCommand: Iterable<String>,
extraArgs: Iterable<String>,
customErrorMessage: ((String) -> String)? = null
customErrorMessage: ((String) -> String)? = null,
) {
fun runWithArgs(file: File? = null) =
bufCommand + listOfNotNull(file?.let { project.makeMangledRelativizedPathStr(it) }) + extraArgs
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/build/buf/gradle/LintTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abstract class LintTask : DefaultTask() {
fun bufLint() {
execBufInSpecificDirectory(
"lint",
bufConfigFile()?.let { listOf("--config", it.readAndStripComments()) }.orEmpty()
bufConfigFile()?.let { listOf("--config", it.readAndStripComments()) }.orEmpty(),
) {
"""
|Some Protobuf files had lint violations:
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/build/buf/gradle/ProcessRunner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal class ProcessRunner : Closeable {
private val args: List<Any>,
val exitCode: Int,
val stdOut: ByteArray,
val stdErr: ByteArray
val stdErr: ByteArray,
) {
override fun toString(): String {
val builder = StringBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ abstract class CreateSymLinksToModulesTask : DefaultTask() {
logger.info("Creating symlink for $it at $symLinkFile")
Files.createSymbolicLink(
symLinkFile.toPath(),
bufbuildDir.toPath().relativize(project.file(it).toPath())
bufbuildDir.toPath().relativize(project.file(it).toPath()),
)
}
}
Expand Down Expand Up @@ -96,7 +96,7 @@ private fun Task.workspaceCommonConfig() {
dependsOn(
project
.tasks
.matching { it::class.java.name == "com.google.protobuf.gradle.ProtobufExtract_Decorated" }
.matching { it::class.java.name == "com.google.protobuf.gradle.ProtobufExtract_Decorated" },
)
createsOutput()
}
Expand Down Expand Up @@ -171,7 +171,7 @@ private fun mangle(name: Path) =

internal inline fun <reified T : Task> Project.registerBufTask(
name: String,
noinline configuration: T.() -> Unit
noinline configuration: T.() -> Unit,
): TaskProvider<T> {
val taskProvider = tasks.register(name, configuration)
withProtobufGradlePlugin {
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/build/buf/gradle/AbstractBreakingTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ abstract class AbstractBreakingTest : AbstractBufIntegrationTest() {
"""
Execution failed for task ':bufBreaking'.
> Some Protobuf files had breaking changes:
""".trimIndent().osIndependent()
""".trimIndent().osIndependent(),
)
assertThat(result.output).contains("Previously present message \"BasicMessage\" was deleted from file.")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract class AbstractBufIntegrationTest : IntegrationTest {
}

class WrappedRunner(
private val delegate: GradleRunner
private val delegate: GradleRunner,
) {
fun withArguments(vararg args: String) =
WrappedRunner(delegate.withArguments(delegate.arguments + args))
Expand All @@ -74,7 +74,7 @@ abstract class AbstractBufIntegrationTest : IntegrationTest {
"-PprotobufGradleVersion=0.9.3",
"-PprotobufVersion=3.23.4",
"-PkotlinVersion=1.7.20",
"-PandroidGradleVersion=7.3.0"
"-PandroidGradleVersion=7.3.0",
)
.let { WrappedRunner(it) }

Expand Down
4 changes: 2 additions & 2 deletions src/test/kotlin/build/buf/gradle/AbstractFormatApplyTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ abstract class AbstractFormatApplyTest : AbstractBufIntegrationTest() {
message Foo {}
""".trimIndent()
""".trimIndent(),
)
}

Expand All @@ -54,7 +54,7 @@ abstract class AbstractFormatApplyTest : AbstractBufIntegrationTest() {
.withArguments(BUF_FORMAT_APPLY_TASK_NAME)
.build()
.task(":$BUF_FORMAT_APPLY_TASK_NAME")
?.outcome
?.outcome,
).isEqualTo(SUCCESS)

assertThat(protoFile.toFile().readText()).isEqualTo(after)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ abstract class AbstractFormatCheckTest : AbstractBufIntegrationTest() {
| +message Foo {}
|
| Run './gradlew :bufFormatApply' to fix these violations.
""".trimMargin()
""".trimMargin(),
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/build/buf/gradle/AbstractLintTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ abstract class AbstractLintTest : LintTestUtilities, AbstractBufIntegrationTest(
"""
Execution failed for task ':bufLint'.
> Some Protobuf files had lint violations:
""".trimIndent().osIndependent()
""".trimIndent().osIndependent(),
)
assertThat(result.output).contains("Enum zero value name \"TEST_FOO\" should be suffixed with \"_UNSPECIFIED\"")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class FormatApplyWithProtobufGradleTest : AbstractFormatApplyTest() {
message BasicMessage {}
""".trimIndent(),
Paths.get(projectDir.path, "subdir", "buf", "test", "v1", "test.proto")
Paths.get(projectDir.path, "subdir", "buf", "test", "v1", "test.proto"),
)
}

Expand Down Expand Up @@ -77,7 +77,7 @@ class FormatApplyWithProtobufGradleTest : AbstractFormatApplyTest() {
protokt.ProtoktFileOptions protokt_file_options = 2;
}
""".trimIndent()
""".trimIndent(),
)
}

Expand Down

0 comments on commit 04db9d7

Please sign in to comment.