aboutsummaryrefslogtreecommitdiff
path: root/build-logic/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'build-logic/src/main')
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/RenameArtifactsPlugin.kt8
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/psl/PSLUpdateTask.kt4
2 files changed, 8 insertions, 4 deletions
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> {
project.pluginManager.withPlugin("com.android.application") {
project.extensions.configure<ApplicationAndroidComponentsExtension> {
onVariants { variant ->
- project.tasks.register<CollectApksTask>("collect${variant.name.capitalize()}Apks") {
+ project.tasks.register<CollectApksTask>(
+ "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<CollectBundleTask>("collect${variant.name.capitalize()}Bundle") {
+ project.tasks.register<CollectBundleTask>(
+ "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)
}
}
}