Skip to content

Commit bb90a58

Browse files
author
Andriy Onyshchuk
committed
fix style
1 parent 9ffad63 commit bb90a58

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

buildSrc/src/main/kotlin/pklAllProjects.gradle.kts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,23 @@ dependencyLocking { lockAllConfigurations() }
2626

2727
configurations {
2828
val rejectedVersionSuffix = Regex("-alpha|-beta|-eap|-m|-rc|-snapshot", RegexOption.IGNORE_CASE)
29-
val versionSuffixRejectionExcemptions = setOf(
30-
// I know.
31-
// This looks odd.
32-
// But yes, it's transitively required by one of the relese versions of `zinc`
33-
// https://github.com/sbt/zinc/blame/57a2df7104b3ce27b46404bb09a0126bd4013427/project/Dependencies.scala#L85
34-
"com.eed3si9n:shaded-scalajson_2.13:1.0.0-M4"
35-
)
29+
val versionSuffixRejectionExcemptions =
30+
setOf(
31+
// I know.
32+
// This looks odd.
33+
// But yes, it's transitively required by one of the relese versions of `zinc`
34+
// https://github.com/sbt/zinc/blame/57a2df7104b3ce27b46404bb09a0126bd4013427/project/Dependencies.scala#L85
35+
"com.eed3si9n:shaded-scalajson_2.13:1.0.0-M4"
36+
)
3637
configureEach {
3738
resolutionStrategy {
3839
componentSelection {
3940
all {
40-
if (rejectedVersionSuffix.containsMatchIn(candidate.version)
41-
&& !versionSuffixRejectionExcemptions.contains("${candidate.group}:${candidate.module}:${candidate.version}")
41+
if (
42+
rejectedVersionSuffix.containsMatchIn(candidate.version) &&
43+
!versionSuffixRejectionExcemptions.contains(
44+
"${candidate.group}:${candidate.module}:${candidate.version}"
45+
)
4246
) {
4347
reject(
4448
"Rejected dependency $candidate " +

buildSrc/src/main/kotlin/pklJavaLibrary.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
@file:Suppress("HttpUrlsUsage", "unused")
1717

18-
import com.diffplug.gradle.spotless.JavaExtension
1918
import org.gradle.accessors.dm.LibrariesForLibs
2019

2120
plugins {
@@ -59,8 +58,10 @@ spotless {
5958
scala {
6059
scalafmt(libs.versions.scalafmt.get())
6160
target("src/*/scala/**/*.scala")
62-
licenseHeaderFile(rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt"),
63-
"package ")
61+
licenseHeaderFile(
62+
rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt"),
63+
"package ",
64+
)
6465
}
6566
kotlin {
6667
ktfmt(libs.versions.ktfmt.get()).googleStyle()

buildSrc/src/main/kotlin/pklScalaLibrary.gradle.kts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import org.gradle.kotlin.dsl.withType
2020
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2121
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
2222

23-
2423
plugins {
2524
id("pklJavaLibrary")
2625
scala
@@ -46,8 +45,6 @@ tasks.withType<KotlinJvmCompile>().configureEach {
4645
tasks.test {
4746
useJUnitPlatform {
4847
includeEngines("scalatest")
49-
testLogging {
50-
events("passed", "skipped", "failed")
51-
}
48+
testLogging { events("passed", "skipped", "failed") }
5249
}
5350
}

0 commit comments

Comments
 (0)