buildSrc minor formatting

This commit is contained in:
Adam 2022-08-28 13:30:51 +02:00
parent c9ae17d418
commit babe74b723
5 changed files with 12 additions and 23 deletions

View file

@ -68,7 +68,7 @@ fun Project.execCapture(spec: ExecSpec.() -> Unit): String {
fun Project.yarn(configure: YarnRootExtension.() -> Unit) = with(yarn, configure)
fun Directory.filesChecksum() = asFileTree
fun Directory.filesChecksum(): Long = asFileTree
.files
.map { it.readBytes() + it.absolutePath.toByteArray() }
.fold(byteArrayOf()) { acc, bytes -> acc + bytes }

View file

@ -22,6 +22,7 @@ dependencies {
testImplementation("io.mockk:mockk")
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
@ -40,16 +41,19 @@ tasks.withType<KotlinCompile>().configureEach {
)
}
tasks.compileTestKotlin {
kotlinOptions.freeCompilerArgs += "-opt-in=io.kotest.common.ExperimentalKotest"
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(projectJvmTarget))
}
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

View file

@ -29,10 +29,7 @@ abstract class UpdatePackageJson @Inject constructor(
) : DefaultTask(),
ProviderFactory by providers {
// @get:Input
// abstract val propertiesToCheck: MapProperty<String, String>
/** Cumulative updates */
/** Cumulative updates - will be combined one by one, then applied to [packageJsonFile] */
@get:Input
internal abstract val expectedJsonUpdates: ListProperty<String>
@ -45,8 +42,6 @@ abstract class UpdatePackageJson @Inject constructor(
description = "Update package.json properties"
outputs.upToDateWhen(JsonPropertiesUpToDateSpec)
// expectedJson.convention("{}")
}
@ -94,19 +89,6 @@ abstract class UpdatePackageJson @Inject constructor(
}
expectedJsonUpdates.add(expectedJsonUpdateProvider)
// val newJson =
// expectedJson.zip(expectedJsonUpdateProvider) { currentJsonString, inputJsonString ->
// val currentJson = jsonMapper.encodeToJsonElement(currentJsonString).jsonObject
//
// val inputJson = jsonMapper.encodeToJsonElement(inputJsonString).jsonObject
//
// val newJson = JsonObject(currentJson + inputJson)
//
// jsonMapper.encodeToString(newJson)
// }
//
// expectedJson.set(newJson)
}