buildSrc minor formatting
This commit is contained in:
parent
c9ae17d418
commit
babe74b723
5 changed files with 12 additions and 23 deletions
|
|
@ -13,7 +13,7 @@ val gradleKotlinTarget = "1.6"
|
||||||
|
|
||||||
dependencies {
|
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-serialization")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable")
|
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("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()}")
|
implementation("io.kvision:io.kvision.gradle.plugin:${libs.versions.kvision.get()}")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,8 @@ dependencyResolutionManagement {
|
||||||
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") {
|
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") {
|
||||||
content { includeGroup("org.jetbrains.kotlinx") }
|
content { includeGroup("org.jetbrains.kotlinx") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sonatypeSnapshot()
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
|
@ -47,9 +49,9 @@ dependencyResolutionManagement {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
jitpack()
|
jitpack()
|
||||||
|
sonatypeSnapshot()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ fun Project.execCapture(spec: ExecSpec.() -> Unit): String {
|
||||||
fun Project.yarn(configure: YarnRootExtension.() -> Unit) = with(yarn, configure)
|
fun Project.yarn(configure: YarnRootExtension.() -> Unit) = with(yarn, configure)
|
||||||
|
|
||||||
|
|
||||||
fun Directory.filesChecksum() = asFileTree
|
fun Directory.filesChecksum(): Long = asFileTree
|
||||||
.files
|
.files
|
||||||
.map { it.readBytes() + it.absolutePath.toByteArray() }
|
.map { it.readBytes() + it.absolutePath.toByteArray() }
|
||||||
.fold(byteArrayOf()) { acc, bytes -> acc + bytes }
|
.fold(byteArrayOf()) { acc, bytes -> acc + bytes }
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ dependencies {
|
||||||
testImplementation("io.mockk:mockk")
|
testImplementation("io.mockk:mockk")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.withType<KotlinCompile>().configureEach {
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
|
|
@ -40,16 +41,19 @@ tasks.withType<KotlinCompile>().configureEach {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.compileTestKotlin {
|
tasks.compileTestKotlin {
|
||||||
kotlinOptions.freeCompilerArgs += "-opt-in=io.kotest.common.ExperimentalKotest"
|
kotlinOptions.freeCompilerArgs += "-opt-in=io.kotest.common.ExperimentalKotest"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvmToolchain {
|
jvmToolchain {
|
||||||
languageVersion.set(JavaLanguageVersion.of(projectJvmTarget))
|
languageVersion.set(JavaLanguageVersion.of(projectJvmTarget))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.withType<Test>().configureEach {
|
tasks.withType<Test>().configureEach {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,7 @@ abstract class UpdatePackageJson @Inject constructor(
|
||||||
) : DefaultTask(),
|
) : DefaultTask(),
|
||||||
ProviderFactory by providers {
|
ProviderFactory by providers {
|
||||||
|
|
||||||
// @get:Input
|
/** Cumulative updates - will be combined one by one, then applied to [packageJsonFile] */
|
||||||
// abstract val propertiesToCheck: MapProperty<String, String>
|
|
||||||
|
|
||||||
/** Cumulative updates */
|
|
||||||
@get:Input
|
@get:Input
|
||||||
internal abstract val expectedJsonUpdates: ListProperty<String>
|
internal abstract val expectedJsonUpdates: ListProperty<String>
|
||||||
|
|
||||||
|
|
@ -45,8 +42,6 @@ abstract class UpdatePackageJson @Inject constructor(
|
||||||
description = "Update package.json properties"
|
description = "Update package.json properties"
|
||||||
|
|
||||||
outputs.upToDateWhen(JsonPropertiesUpToDateSpec)
|
outputs.upToDateWhen(JsonPropertiesUpToDateSpec)
|
||||||
|
|
||||||
// expectedJson.convention("{}")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -94,19 +89,6 @@ abstract class UpdatePackageJson @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
expectedJsonUpdates.add(expectedJsonUpdateProvider)
|
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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue