Skip to content

Commit

Permalink
chore(deps): update dependency gradle to v8.7 (#239)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Urs Joss <[email protected]>
  • Loading branch information
renovate[bot] and ursjoss authored Mar 23, 2024
1 parent bbc2cef commit c165611
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/detekt-hint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '*'

jobs:
hint:
gradle:
strategy:
matrix:
os: [ubuntu-latest]
Expand All @@ -17,8 +17,8 @@ jobs:
JDK_VERSION: ${{ matrix.jdk }}
steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@v2

- name: Run detekt hint
uses: mkohm/[email protected]
with:
Expand Down
9 changes: 9 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ subprojects.forEach { subProject ->
}
}

// see https://github.com/detekt/detekt/issues/6198
configurations.matching { it.name == "detekt" }.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlin") {
useVersion(libs.versions.detektKotlinVersion.get())
}
}
}


fun Project.projectRelativeSourceLink(branch: String = "main", srcSet: String = kotlinSrcSet) =
"https://github.com/ursjoss/KRis/blob/$branch/${projectDir.relativeTo(rootDir)}/$srcSet"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ detekt-hint:
active: true
threshold: "0.8"
InterfaceSegregationPrinciple:
active: true
active: true
OpenClosedPrinciple:
active: true
active: true
File renamed without changes.
2 changes: 1 addition & 1 deletion gradle-plugins/publishing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {

detekt {
buildUponDefaultConfig = true
config.from(file("../../config/detekt/detekt.yml"))
config.from(file("../../config/detekt.yml"))
}

gradlePlugin {
Expand Down
2 changes: 1 addition & 1 deletion gradle-plugins/verification/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ kotlin {

detekt {
buildUponDefaultConfig = true
config.from(file("../../config/detekt/detekt.yml"))
config.from(file("../../config/detekt.yml"))
}

gradlePlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.JavaBasePlugin

@Suppress("unused")
@Suppress("unused", "LackOfCohesionMethods")
class CollectSarifPlugin : Plugin<Project> {

override fun apply(target: Project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class KrisDetektPlugin : Plugin<Project> {
allRules = true
baseline = target.file("detekt-baseline.xml")
basePath = rootProject.projectDir.absolutePath
config.setFrom("${rootProject.projectDir}/config/detekt/detekt.yml")
config.setFrom("${rootProject.projectDir}/config/detekt.yml")
}

// enable SARIF report
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ junitJupiter = "5.10.2"
kluent = "1.73"
kotest = "5.8.1"
kotlin = "1.9.23"
# See https://github.com/detekt/detekt/issues/6198
detektKotlinVersion = "1.9.22"
mockk = "1.13.10"
nexusPublish = "1.3.0"
rxjava = "2.2.21"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ch.difty.kris.domain

/**
* A single RIS record. It contains all the allowed tag from RIS format.
* A single RIS record. It contains all the allowed tags from RIS format.
*/
@Suppress("ParameterListWrapping", "SpellCheckingInspection", "TooManyFunctions")
@Suppress("ParameterListWrapping", "SpellCheckingInspection", "TooManyFunctions", "LackOfCohesionMethods")
public data class RisRecord(

/** TY */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import kotlinx.coroutines.flow.flow

private const val INT_INTERMEDIATE = 1000

private val LINE_SEPARATOR = System.getProperty("line.separator")
private val LINE_SEPARATOR = System.lineSeparator()

internal object RisExport {

/**
* Converts a flow of [RisRecord]s into a flow of [String]s in RIS file format.
* Optionally accepts a list of names of [RisTag]s defining a sort order for the [RisTag]s in the file.
*/
@Suppress("OpenClosedPrinciple")
internal fun build(recordFlow: Flow<RisRecord>, sort: List<String> = emptyList()): Flow<String> = flow {
fun RisTag.withValue(value: Any): String = "$this$TAG_SEPARATOR$value$LINE_SEPARATOR"
val sortMap = sort.withIndex().associate { RisTag.valueOf(it.value) to it.index }.toMap()
Expand Down

0 comments on commit c165611

Please sign in to comment.