Upgrade ktfmt and setup automatic updates (#2103)

This commit is contained in:
Harsh Shandilya 2022-09-02 22:04:02 +05:30 committed by GitHub
parent 903f11c303
commit a828846345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 6 deletions

12
.github/renovate.json vendored
View File

@ -8,5 +8,17 @@
"matchPackagePatterns": ["^kotlin", "^org.jetbrains.kotlin"],
"groupName": "kotlin"
}
],
"regexManagers": [
{
"fileMatch": [
".kt$"
],
"matchStrings": [
"KTFMT_VERSION = \"(?<currentValue>.*)\""
],
"datasourceTemplate": "maven",
"depNameTemplate": "com.facebook:ktfmt"
}
]
}

View File

@ -155,10 +155,14 @@ abstract class GitOperation(protected val callingActivity: FragmentActivity) {
.setTitle(callingActivity.resources.getString(R.string.ssh_preferences_dialog_title))
.setPositiveButton(
callingActivity.resources.getString(R.string.ssh_preferences_dialog_import)
) { _, _ -> getSshKey(false) }
) { _, _ ->
getSshKey(false)
}
.setNegativeButton(
callingActivity.resources.getString(R.string.ssh_preferences_dialog_generate)
) { _, _ -> getSshKey(true) }
) { _, _ ->
getSshKey(true)
}
.setNeutralButton(callingActivity.resources.getString(R.string.dialog_cancel)) { _, _ ->
// Finish the blank GitActivity so user doesn't have to press back
callingActivity.finish()
@ -177,7 +181,9 @@ abstract class GitOperation(protected val callingActivity: FragmentActivity) {
BiometricAuthenticator.authenticate(
callingActivity,
R.string.biometric_prompt_title_ssh_auth
) { result -> if (result !is Failure) cont.resume(result) }
) { result ->
if (result !is Failure) cont.resume(result)
}
}
}
when (result) {

View File

@ -285,7 +285,9 @@ private constructor(
FillableFieldType.NewPassword,
)
}
) { "Every rule block can only have either genericPassword or {current,new}Password blocks" }
) {
"Every rule block can only have either genericPassword or {current,new}Password blocks"
}
matchers.add(
AutofillRuleMatcher(
type = FillableFieldType.GenericPassword,

View File

@ -39,6 +39,6 @@ class SpotlessPlugin : Plugin<Project> {
}
private companion object {
private const val KTFMT_VERSION = "0.39"
private const val KTFMT_VERSION = "0.40"
}
}

View File

@ -242,7 +242,9 @@ public class OpenPgpSignatureResult : Parcelable {
!(signatureStatus == RESULT_NO_SIGNATURE ||
signatureStatus == RESULT_KEY_MISSING ||
signatureStatus == RESULT_INVALID_SIGNATURE)
) { "can only use this method for valid types of signatures" }
) {
"can only use this method for valid types of signatures"
}
return OpenPgpSignatureResult(
signatureStatus,
primaryUserId,