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
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"], "matchPackagePatterns": ["^kotlin", "^org.jetbrains.kotlin"],
"groupName": "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)) .setTitle(callingActivity.resources.getString(R.string.ssh_preferences_dialog_title))
.setPositiveButton( .setPositiveButton(
callingActivity.resources.getString(R.string.ssh_preferences_dialog_import) callingActivity.resources.getString(R.string.ssh_preferences_dialog_import)
) { _, _ -> getSshKey(false) } ) { _, _ ->
getSshKey(false)
}
.setNegativeButton( .setNegativeButton(
callingActivity.resources.getString(R.string.ssh_preferences_dialog_generate) callingActivity.resources.getString(R.string.ssh_preferences_dialog_generate)
) { _, _ -> getSshKey(true) } ) { _, _ ->
getSshKey(true)
}
.setNeutralButton(callingActivity.resources.getString(R.string.dialog_cancel)) { _, _ -> .setNeutralButton(callingActivity.resources.getString(R.string.dialog_cancel)) { _, _ ->
// Finish the blank GitActivity so user doesn't have to press back // Finish the blank GitActivity so user doesn't have to press back
callingActivity.finish() callingActivity.finish()
@@ -177,7 +181,9 @@ abstract class GitOperation(protected val callingActivity: FragmentActivity) {
BiometricAuthenticator.authenticate( BiometricAuthenticator.authenticate(
callingActivity, callingActivity,
R.string.biometric_prompt_title_ssh_auth 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) { when (result) {

View File

@@ -285,7 +285,9 @@ private constructor(
FillableFieldType.NewPassword, 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( matchers.add(
AutofillRuleMatcher( AutofillRuleMatcher(
type = FillableFieldType.GenericPassword, type = FillableFieldType.GenericPassword,

View File

@@ -39,6 +39,6 @@ class SpotlessPlugin : Plugin<Project> {
} }
private companion object { 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_NO_SIGNATURE ||
signatureStatus == RESULT_KEY_MISSING || signatureStatus == RESULT_KEY_MISSING ||
signatureStatus == RESULT_INVALID_SIGNATURE) 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( return OpenPgpSignatureResult(
signatureStatus, signatureStatus,
primaryUserId, primaryUserId,