Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all non-major dependencies (except core Kotlin) #1672

Merged
merged 3 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions diktat-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration")
id("org.cqfn.diktat.buildutils.code-quality-convention")
id("pl.droidsonroids.jacoco.testkit") version "1.0.9"
id("org.gradle.test-retry") version "1.5.2"
id("pl.droidsonroids.jacoco.testkit") version "1.0.12"
id("org.gradle.test-retry") version "1.5.3"
id("com.gradle.plugin-publish") version "1.2.0"
}

Expand Down
2 changes: 1 addition & 1 deletion diktat-maven-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration")
id("org.cqfn.diktat.buildutils.code-quality-convention")
id("org.cqfn.diktat.buildutils.publishing-configuration")
id("de.benediktritter.maven-plugin-development") version "0.4.1"
id("de.benediktritter.maven-plugin-development") version "0.4.2"
`maven-publish`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import org.cqfn.diktat.ktlint.DiktatProcessorFactoryImpl
import org.cqfn.diktat.ktlint.DiktatReporterFactoryImpl
import org.cqfn.diktat.ruleset.rules.DiktatRuleSetFactoryImpl

import org.apache.maven.execution.MavenSession
import org.apache.maven.plugin.AbstractMojo
import org.apache.maven.plugin.Mojo
import org.apache.maven.plugin.MojoExecutionException
Expand All @@ -25,12 +24,6 @@ import kotlin.io.path.Path
* Base [Mojo] for checking and fixing code using diktat
*/
abstract class DiktatBaseMojo : AbstractMojo() {
/**
* Flag that indicates whether to turn debug logging on
*/
@Parameter(property = "diktat.debug")
var debug = false

/**
* Property that will be used if you need to publish the report to GitHub
*/
Expand Down Expand Up @@ -82,9 +75,6 @@ abstract class DiktatBaseMojo : AbstractMojo() {
@Parameter(property = "diktat.excludes", defaultValue = "")
lateinit var excludes: List<String>

@Parameter(defaultValue = "\${session}", readonly = true)
private lateinit var mavenSession: MavenSession

/**
* @param runner instance of [DiktatRunner] used in analysis
* @param args arguments for [DiktatRunner]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,17 @@ import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline

import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION
import org.jetbrains.kotlin.KtNodeTypes.BLOCK
import org.jetbrains.kotlin.KtNodeTypes.BOOLEAN_CONSTANT
import org.jetbrains.kotlin.KtNodeTypes.CHARACTER_CONSTANT
import org.jetbrains.kotlin.KtNodeTypes.DOT_QUALIFIED_EXPRESSION
import org.jetbrains.kotlin.KtNodeTypes.FLOAT_CONSTANT
import org.jetbrains.kotlin.KtNodeTypes.FUN
import org.jetbrains.kotlin.KtNodeTypes.FUNCTION_LITERAL
import org.jetbrains.kotlin.KtNodeTypes.IMPORT_LIST
import org.jetbrains.kotlin.KtNodeTypes.INTEGER_CONSTANT
import org.jetbrains.kotlin.KtNodeTypes.LITERAL_STRING_TEMPLATE_ENTRY
import org.jetbrains.kotlin.KtNodeTypes.LONG_STRING_TEMPLATE_ENTRY
import org.jetbrains.kotlin.KtNodeTypes.NULL
import org.jetbrains.kotlin.KtNodeTypes.OPERATION_REFERENCE
import org.jetbrains.kotlin.KtNodeTypes.PACKAGE_DIRECTIVE
import org.jetbrains.kotlin.KtNodeTypes.PARENTHESIZED
import org.jetbrains.kotlin.KtNodeTypes.POSTFIX_EXPRESSION
import org.jetbrains.kotlin.KtNodeTypes.PREFIX_EXPRESSION
import org.jetbrains.kotlin.KtNodeTypes.PROPERTY
import org.jetbrains.kotlin.KtNodeTypes.REFERENCE_EXPRESSION
import org.jetbrains.kotlin.KtNodeTypes.SAFE_ACCESS_EXPRESSION
import org.jetbrains.kotlin.KtNodeTypes.SHORT_STRING_TEMPLATE_ENTRY
import org.jetbrains.kotlin.KtNodeTypes.STRING_TEMPLATE
import org.jetbrains.kotlin.KtNodeTypes.VALUE_ARGUMENT_LIST
import org.jetbrains.kotlin.KtNodeTypes.WHEN_CONDITION_EXPRESSION
Expand Down Expand Up @@ -774,19 +765,8 @@ class LineLength(configRules: List<RulesConfig>) : DiktatRule(
}
}

/**
* val text = "first part" +
* "second part" +
* "third part"
* STRING_PART_OFFSET equal to the left offset of first string part("first part") =
* white space + close quote (open quote removed by trim) + white space + plus sign
*/
companion object {
private const val MAX_LENGTH = 120L
const val NAME_ID = "line-length"
private const val STRING_PART_OFFSET = 4
private val propertyList = listOf(INTEGER_CONSTANT, LITERAL_STRING_TEMPLATE_ENTRY, FLOAT_CONSTANT,
CHARACTER_CONSTANT, REFERENCE_EXPRESSION, BOOLEAN_CONSTANT, LONG_STRING_TEMPLATE_ENTRY,
SHORT_STRING_TEMPLATE_ENTRY, NULL)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import org.jetbrains.kotlin.psi.KtProperty
* Not recommended: val myVariable: Map<Int, String> = emptyMap<Int, String>() or val myVariable = emptyMap<Int, String>()
* Recommended: val myVariable: Map<Int, String> = emptyMap()
*/
@Suppress("ForbiddenComment")
// FIXME: we now don't have access to return types, so we can perform this check only if explicit type is present, but should be able also if it's not.
class VariableGenericTypeDeclarationRule(configRules: List<RulesConfig>) : DiktatRule(
NAME_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,15 @@ fun <T> retry(

var lastError: Throwable? = null

for (i in 1..attempts) {
repeat(attempts) {
try {
return block()
} catch (error: Throwable) {
lastError = error
}

if (delayMillis > 0L) {
@Suppress("SleepInsteadOfDelay")
Thread.sleep(delayMillis)
}
}
Expand Down
20 changes: 10 additions & 10 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[versions]
kotlin = "1.8.21"
kotlin-ksp = "1.8.21-1.0.11"
serialization = "1.5.0"
serialization = "1.5.1"
ktlint = "0.48.2"
junit = "5.9.2"
junit-platfrom = "1.9.2"
junit = "5.9.3"
junit-platfrom = "1.9.3"
guava = "32.0.0-jre"
commons-cli = "1.5.0"
commons-io = "2.11.0"
commons-io = "2.12.0"
kotlinpoet = "1.12.0"
detekt = "1.22.0"
detekt = "1.23.0"
dokka = "1.7.20"
jacoco = "0.8.8"
# maven
maven-api = "3.9.1"
maven-api = "3.9.2"
maven-plugin-tools = "3.8.1"
maven-plugin-testing-harness = "3.3.0"
plexus = "2.0"
Expand All @@ -22,9 +22,9 @@ jbool = "1.24"
# downgraded to be compliance with ktlint
mu-logging = "2.1.23"
log4j2 = "2.20.0"
kaml = "0.53.0"
kaml = "0.54.0"
kotlin-multiplatform-diff = "0.4.0"
sarif4k = "0.3.0"
sarif4k = "0.4.0"
jupiter-itf-extension = "0.12.0"
# FIXME: need to migrate to mockito
mockito-all = "1.10.19"
Expand All @@ -47,12 +47,12 @@ mockito = "5.2.0"
mockito-kotlin = "4.1.0"
testcontainers = "1.17.6"
okhttp3 = "4.10.0"
reckon = "0.16.1"
reckon = "0.18.0"
nulls marked this conversation as resolved.
Show resolved Hide resolved
commons-compress = "1.22"
zip4j = "2.11.5"
ktoml = "0.4.1"
springdoc = "1.6.15"
spotless = "6.18.0"
spotless = "6.19.0"
arrow-kt = "1.1.5"
publish = "1.3.0"
download = "5.4.0"
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pluginManagement {
}

plugins {
id("com.gradle.enterprise") version "3.12.6"
id("com.gradle.enterprise") version "3.13.3"
}

includeBuild("gradle/plugins")
Expand Down