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

@ -13,7 +13,7 @@ val gradleKotlinTarget = "1.6"
dependencies {
implementation(enforcedPlatform("org.jetbrains.kotlin:kotlin-bom:${libs.versions.kotlin.get()}"))
implementation(platform(libs.kotlin.bom))
implementation("org.jetbrains.kotlin:kotlin-serialization")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable")
@ -29,7 +29,8 @@ dependencies {
implementation("com.github.node-gradle:gradle-node-plugin:${libs.versions.gradleNodePlugin.get()}")
implementation("io.kotest:kotest-framework-multiplatform-plugin-gradle:${libs.versions.kotest.get()}")
implementation(platform(libs.kotest.bom))
implementation("io.kotest:kotest-framework-multiplatform-plugin-gradle")
implementation("io.kvision:io.kvision.gradle.plugin:${libs.versions.kvision.get()}")

View file

@ -39,6 +39,8 @@ dependencyResolutionManagement {
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") {
content { includeGroup("org.jetbrains.kotlinx") }
}
sonatypeSnapshot()
}
pluginManagement {
@ -47,9 +49,9 @@ dependencyResolutionManagement {
gradlePluginPortal()
mavenCentral()
jitpack()
sonatypeSnapshot()
}
}
}

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)
}