Skip to content

Commit

Permalink
Bump org.jetbrains.kotlinx.binary-compatibility-validator from 0.13.2…
Browse files Browse the repository at this point in the history
… to 0.14.0 (#108)

* Bump org.jetbrains.kotlinx.binary-compatibility-validator

Bumps [org.jetbrains.kotlinx.binary-compatibility-validator](https://github.com/Kotlin/binary-compatibility-validator) from 0.13.2 to 0.14.0.
- [Release notes](https://github.com/Kotlin/binary-compatibility-validator/releases)
- [Commits](Kotlin/binary-compatibility-validator@0.13.2...0.14.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx.binary-compatibility-validator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* ktfmt 0.47

* JDK 21

* Regen API

* Spotless

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zac Sweers <[email protected]>
  • Loading branch information
dependabot[bot] and ZacSweers committed Feb 3, 2024
1 parent e48f34c commit df0fc3b
Show file tree
Hide file tree
Showing 25 changed files with 77 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '20'
java-version: '21'

- name: Build and test
uses: gradle/gradle-build-action@v2
Expand Down
4 changes: 0 additions & 4 deletions api/kotlin-cli-util.api
Original file line number Diff line number Diff line change
Expand Up @@ -3502,10 +3502,6 @@ public final class slack/cli/sarif/MergeSarifReports$Factory : slack/cli/Command
public fun getKey ()Ljava/lang/String;
}

public synthetic class slack/cli/sarif/SarifUtilKt$EntriesMappings {
public static final synthetic field entries$0 Lkotlin/enums/EnumEntries;
}

public final class slack/cli/shellsentry/AnalysisResult {
public fun <init> (Ljava/lang/String;Ljava/lang/String;Lslack/cli/shellsentry/RetrySignal;ILkotlin/jvm/functions/Function1;)V
public final fun component1 ()Ljava/lang/String;
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ spotless {
endWithNewline()
licenseHeaderFile(
"spotless/spotless.kt",
"(import|plugins|buildscript|dependencies|pluginManagement)"
"(import|plugins|buildscript|dependencies|pluginManagement)",
)
}
}

configure<JavaPluginExtension> { toolchain { languageVersion.set(JavaLanguageVersion.of(20)) } }
configure<JavaPluginExtension> { toolchain { languageVersion.set(JavaLanguageVersion.of(21)) } }

tasks.withType<JavaCompile>().configureEach {
options.release.set(libs.versions.jvmTarget.get().toInt())
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kotlin = "1.9.22"
kotlinx-serialization = "1.6.2"
ksp = "1.9.22-1.0.17"
ktfmt = "0.46"
ktfmt = "0.47"
jvmTarget = "17"
moshix = "0.25.1"
moshi = "1.15.1"
Expand All @@ -19,7 +19,7 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
spotless = { id = "com.diffplug.spotless", version = "6.25.0" }
binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.13.2" }
binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.14.0" }
retry = { id = "org.gradle.test-retry", version = "1.5.8" }

[libraries]
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/slack/cli/CliUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public fun Sequence<File>.filterByExtension(extension: String): Sequence<File> {
/** Filters by a specific [name]. */
public fun Sequence<File>.filterByName(
name: String,
withoutExtension: Boolean = true
withoutExtension: Boolean = true,
): Sequence<File> {
return if (withoutExtension) {
filter { it.nameWithoutExtension == name }
Expand All @@ -94,7 +94,7 @@ public fun Sequence<Path>.filterByExtension(extension: String): Sequence<Path> {
@JvmName("filterByNamePath")
public fun Sequence<Path>.filterByName(
name: String,
withoutExtension: Boolean = true
withoutExtension: Boolean = true,
): Sequence<Path> {
return if (withoutExtension) {
filter { it.nameWithoutExtension == name }
Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/slack/cli/CliktExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@file:Suppress(
"LongParameterList", // These are how many parameters are in Clikt options.
"SpreadOperator", // Not spreading would change semantics.
"unused"
"unused",
)

package slack.cli
Expand All @@ -34,14 +34,14 @@ import java.nio.file.Paths
/** A dry run option for [clikt commands][CliktCommand]. */
public fun CliktCommand.dryRunOption(
vararg names: String = arrayOf("--dry-run"),
help: String = "Runs this as a dry run, no modifications."
help: String = "Runs this as a dry run, no modifications.",
): OptionWithValues<Boolean, Boolean, Boolean> =
option(names = names, help = help).flag(default = false)

/** A project dir option for [clikt commands][CliktCommand]. */
public fun CliktCommand.projectDirOption(
vararg names: String = arrayOf("--project-dir"),
help: String = "The project directory. Defaults to the current working directory."
help: String = "The project directory. Defaults to the current working directory.",
): OptionDelegate<Path> =
option(names = names, help = help).path(mustExist = true, canBeFile = false).defaultLazy {
Paths.get("").toAbsolutePath()
Expand Down
10 changes: 4 additions & 6 deletions src/main/kotlin/slack/cli/buildkite/BuildkiteDataBindings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ public data class ExternalNotification(
@Serializable
public data class GithubCheck(
/** GitHub commit status name */
val context: String? = null,
val context: String? = null
)

@Serializable
public data class GithubCommitStatus(
/** GitHub commit status name */
val context: String? = null,
val context: String? = null
)

@Serializable
Expand Down Expand Up @@ -715,7 +715,7 @@ public sealed interface SoftFail {
@Serializable
public data class SoftFailElement(
/** The exit status number that will cause this job to soft-fail */
@SerialName("exit_status") val exitStatus: ExitStatusUnion? = null,
@SerialName("exit_status") val exitStatus: ExitStatusUnion? = null
)

@Serializable
Expand Down Expand Up @@ -764,9 +764,7 @@ public sealed interface Setup {
public sealed interface Plugins {
@Serializable
@JvmInline
public value class AnythingMapValue(
public val value: JsonObject,
) : Plugins
public value class AnythingMapValue(public val value: JsonObject) : Plugins

@Serializable
@JvmInline
Expand Down
8 changes: 3 additions & 5 deletions src/main/kotlin/slack/cli/buildkite/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,15 @@ public object Conditions {

public fun githubStatusNotif(
context: String,
notifyIf: String = Conditions.NOT_CANCELLING
notifyIf: String = Conditions.NOT_CANCELLING,
): Notification =
Notification(
ExternalNotification(
githubCommitStatus = GithubCommitStatus(context = context),
notifyIf = notifyIf
notifyIf = notifyIf,
)
)

public fun CommandStep.withGithubStatus(context: String): CommandStep {
return copy(
notify = listOf(githubStatusNotif(context)),
)
return copy(notify = listOf(githubStatusNotif(context)))
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ internal object JsonObjectAsMapSerializer : KSerializer<JsonObject> {
buildClassSerialDescriptor("JsonObjectAsMap") {
element(
"properties",
mapSerialDescriptor(String.serializer().descriptor, JsonElementKamlSerializer.descriptor)
mapSerialDescriptor(String.serializer().descriptor, JsonElementKamlSerializer.descriptor),
)
}

override fun serialize(encoder: Encoder, value: JsonObject) {
val map = value.mapValues { it.value }
encoder.encodeSerializableValue(
MapSerializer(String.serializer(), JsonElementKamlSerializer),
map
map,
)
}

Expand Down Expand Up @@ -132,7 +132,7 @@ internal object JsonPrimitiveSerializer : KSerializer<JsonPrimitive> {
throw JsonDecodingException(
-1,
"Unexpected JSON element, expected JsonPrimitive, had ${result::class}",
result.toString()
result.toString(),
)
}
return result
Expand Down Expand Up @@ -205,7 +205,7 @@ private object JsonLiteralSerializer : KSerializer<JsonLiteral> {
throw JsonDecodingException(
-1,
"Unexpected JSON element, expected JsonLiteral, had ${result::class}",
result.toString()
result.toString(),
)
}
return result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class GradleProjectFlattenerCli : CliktCommand(help = DESCRIPTION) {
"-s",
help =
"The settings.gradle file to use. Note this file _must_ only have a single, top-level `include()` call " +
"with vararg project args."
"with vararg project args.",
)
.path(mustExist = true, canBeDir = false)
.required()
Expand Down
12 changes: 6 additions & 6 deletions src/main/kotlin/slack/cli/gradle/GradleSettingsVerifierCli.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class GradleSettingsVerifierCli : CliktCommand(help = DESCRIPTION) {
"-s",
help =
"The settings.gradle file to use. Note this file _must_ only have a single, top-level `include()` call " +
"with vararg project args."
"with vararg project args.",
)
.path(mustExist = true, canBeDir = false)
.required()
Expand All @@ -71,15 +71,15 @@ public class GradleSettingsVerifierCli : CliktCommand(help = DESCRIPTION) {
"--implicit-path",
"-i",
help =
"Implicit project names that may not be present in the settings file but should be assumed present."
"Implicit project names that may not be present in the settings file but should be assumed present.",
)
.multiple()

private val deleteUnIncludedPaths by
option(
"--delete-un-included-paths",
"-d",
help = "Delete any paths that are not included in the settings file."
help = "Delete any paths that are not included in the settings file.",
)
.flag()

Expand Down Expand Up @@ -143,19 +143,19 @@ public class GradleSettingsVerifierCli : CliktCommand(help = DESCRIPTION) {
!realPath.exists() -> {
reportError(
"Project dir '${realPath.relativeTo(projectDir)}' does not exist.",
line.indexOfFirst { !it.isWhitespace() }
line.indexOfFirst { !it.isWhitespace() },
)
}
!realPath.resolve("build.gradle.kts").exists() -> {
reportError(
"Project build file '${realPath.relativeTo(projectDir).resolve("build.gradle.kts")}' does not exist.",
line.indexOfFirst { !it.isWhitespace() }
line.indexOfFirst { !it.isWhitespace() },
)
}
!realPath.isDirectory() -> {
reportError(
"Expected '$realPath' to be a directory.",
line.indexOfFirst { !it.isWhitespace() }
line.indexOfFirst { !it.isWhitespace() },
)
}
}
Expand Down
18 changes: 9 additions & 9 deletions src/main/kotlin/slack/cli/lint/LintBaselineMergerCli.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public class LintBaselineMergerCli : CliktCommand(DESCRIPTION) {
help =
"Template for messages with each issue. This message can optionally " +
"contain '{id}' in it to be replaced with the issue ID and '{message}' " +
"for the original message."
"for the original message.",
)
.default("{message}")

Expand All @@ -117,7 +117,7 @@ public class LintBaselineMergerCli : CliktCommand(DESCRIPTION) {
name = issue.id,
shortDescription = MultiformatMessageString(text = issue.message),
fullDescription = MultiformatMessageString(text = issue.message),
defaultConfiguration = ReportingConfiguration(level = Level.Error)
defaultConfiguration = ReportingConfiguration(level = Level.Error),
)
}
.sortedBy { it.id }
Expand All @@ -141,7 +141,7 @@ public class LintBaselineMergerCli : CliktCommand(DESCRIPTION) {
{ it.id },
{ it.location.file },
{ it.location.line },
{ it.location.column }
{ it.location.column },
)
)
.map { key -> key to issues.getValue(key) }
Expand All @@ -157,11 +157,11 @@ public class LintBaselineMergerCli : CliktCommand(DESCRIPTION) {
Message(
text =
messageTemplate.replace("{id}", id).replace("{message}", issue.message)
)
),
)
}
},
)
)
),
)

SarifSerializer.toJson(outputSarif).let { outputFile.writeText(it) }
Expand Down Expand Up @@ -212,7 +212,7 @@ public class LintBaselineMergerCli : CliktCommand(DESCRIPTION) {
@Serializable(HtmlEscapeStringSerializer::class) val name: String,
@Serializable(HtmlEscapeStringSerializer::class) val variant: String,
@Serializable(HtmlEscapeStringSerializer::class) val version: String,
val issues: List<LintIssue>
val issues: List<LintIssue>,
) {
@Serializable
@XmlSerialName("issue")
Expand Down Expand Up @@ -269,8 +269,8 @@ public class LintBaselineMergerCli : CliktCommand(DESCRIPTION) {
$errorLine2
"""
.trimIndent()
)
)
),
),
)
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/slack/cli/sarif/ApplyBaselinesToSarifs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class ApplyBaselinesToSarifs : CliktCommand(help = DESCRIPTION) {
"--remove-uri-prefixes",
help =
"When enabled, removes the root project directory from location uris such that they are only " +
"relative to the root project dir."
"relative to the root project dir.",
)
.flag()

Expand Down Expand Up @@ -172,7 +172,7 @@ public class ApplyBaselinesToSarifs : CliktCommand(help = DESCRIPTION) {
newCurrentSchema.mergeWith(
absentResultsSchema,
removeUriPrefixes = removeUriPrefixes,
log = ::echo
log = ::echo,
)
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/kotlin/slack/cli/sarif/MergeSarifReports.kt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class MergeSarifReports : CliktCommand(help = DESCRIPTION) {
option(
"--remap-src-roots",
help =
"When enabled, remaps uri roots to include the subproject path (relative to the root project)."
"When enabled, remaps uri roots to include the subproject path (relative to the root project).",
)
.flag()

Expand All @@ -75,15 +75,15 @@ public class MergeSarifReports : CliktCommand(help = DESCRIPTION) {
"--remove-uri-prefixes",
help =
"When enabled, removes the root project directory from location uris such that they are only " +
"relative to the root project dir."
"relative to the root project dir.",
)
.flag()

private val allowEmpty by
option(
"--allow-empty",
help = "Flag to allow graceful exiting if no sarif files are found.",
envvar = "SARIF_MERGING_ALLOW_EMPTY"
envvar = "SARIF_MERGING_ALLOW_EMPTY",
)
.flag()

Expand Down Expand Up @@ -229,7 +229,7 @@ public class MergeSarifReports : CliktCommand(help = DESCRIPTION) {
)
}
)
}
},
)
}
)
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/slack/cli/sarif/SarifUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import java.util.Objects
internal val BASELINE_SUPPRESSION: Suppression =
Suppression(
kind = SuppressionKind.External,
justification = "This issue was suppressed by the baseline"
justification = "This issue was suppressed by the baseline",
)

/**
Expand Down Expand Up @@ -97,7 +97,7 @@ internal fun CliktCommand.levelOption(): NullableOption<Level, Level> {
return option(
"--level",
"-l",
help = "Priority level. Defaults to Error. Options are $LEVEL_NAMES"
help = "Priority level. Defaults to Error. Options are $LEVEL_NAMES",
)
.enum<Level>()
}
Expand Down
Loading

0 comments on commit df0fc3b

Please sign in to comment.