From fbb8eedb9df1a76e4967020104698182ae48ba6e Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 29 Dec 2022 22:00:40 +0530 Subject: feat(gradle): bump to 8.0 RC1 --- .../main/kotlin/app/passwordstore/gradle/RenameArtifactsPlugin.kt | 8 ++++++-- .../src/main/kotlin/app/passwordstore/gradle/psl/PSLUpdateTask.kt | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'build-logic/src/main/kotlin') diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/RenameArtifactsPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/RenameArtifactsPlugin.kt index 813155b4..a65b9794 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/RenameArtifactsPlugin.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/RenameArtifactsPlugin.kt @@ -17,13 +17,17 @@ class RenameArtifactsPlugin : Plugin { project.pluginManager.withPlugin("com.android.application") { project.extensions.configure { onVariants { variant -> - project.tasks.register("collect${variant.name.capitalize()}Apks") { + project.tasks.register( + "collect${variant.name.replaceFirstChar { it.uppercase() }}Apks" + ) { variantName.set(variant.name) apkFolder.set(variant.artifacts.get(SingleArtifact.APK)) builtArtifactsLoader.set(variant.artifacts.getBuiltArtifactsLoader()) outputDirectory.set(project.layout.projectDirectory.dir("outputs")) } - project.tasks.register("collect${variant.name.capitalize()}Bundle") { + project.tasks.register( + "collect${variant.name.replaceFirstChar { it.uppercase() }}Bundle" + ) { val mainOutput = variant.outputs.single { it.outputType == VariantOutputConfiguration.OutputType.SINGLE diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/psl/PSLUpdateTask.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/psl/PSLUpdateTask.kt index a5de3d49..381cb40e 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/psl/PSLUpdateTask.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/psl/PSLUpdateTask.kt @@ -91,13 +91,13 @@ abstract class PSLUpdateTask : DefaultTask() { sink.writeInt(data.totalRuleBytes) for (domain in data.sortedRules) { - sink.write(domain).writeByte('\n'.toInt()) + sink.write(domain).writeByte('\n'.code) } sink.writeInt(data.totalExceptionRuleBytes) for (domain in data.sortedExceptionRules) { - sink.write(domain).writeByte('\n'.toInt()) + sink.write(domain).writeByte('\n'.code) } } } -- cgit v1.2.3