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 plugin codequalitytools to v0.24.0 #244

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 9 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[*.{kt,kts}]
ktlint_code_style=intellij_idea
indent_size=2
continuation_indent_size=2
insert_final_newline=true
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
ktlint_disabled_rules=annotation,argument-list-wrapping,spacing-between-declarations-with-annotations,filename
insert_final_newline=true
ktlint_standard_annotation=disabled
ktlint_standard_max-line-length=disabled
ktlint_standard_filename=disabled
ktlint_standard_discouraged-comment-location=disabled
ktlint_standard_class-signature=disabled
ktlint_standard_spacing-between-declarations-with-annotations=disabled
ktlint_experimental=enabled
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.vanniktech:gradle-code-quality-tools-plugin:0.22.0'
classpath 'com.vanniktech:gradle-code-quality-tools-plugin:0.24.0'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.27.0'
}
}
Expand All @@ -30,7 +30,7 @@ validatePlugins {

codeQualityTools {
ktlint {
toolVersion = "0.47.1"
toolVersion = "1.0.1"
}
detekt {
enabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ sealed interface DependencyContainer {

data class Project internal constructor(
internal val project: GradleProject,
) : DependencyContainer, GradleProject by project
) : DependencyContainer,
GradleProject by project

data class ResolvedDependency internal constructor(
internal val resolvedDependency: GradleResolvedDependency,
) : DependencyContainer, GradleResolvedDependency by resolvedDependency
) : DependencyContainer,
GradleResolvedDependency by resolvedDependency
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ open class DependencyGraphGeneratorExtension(project: Project) {
) {
/** Gradle task name that is associated with this generator. */
@get:Internal val gradleTaskName = "generateDependencyGraph${
name.replaceFirstChar {
when {
it.isLowerCase() -> it.titlecase(Locale.getDefault())
else -> it.toString()
name.replaceFirstChar {
when {
it.isLowerCase() -> it.titlecase(Locale.getDefault())
else -> it.toString()
}
}
}
}"
@get:Internal internal val outputFileName = "dependency-graph${name.toHyphenCase().nonEmptyPrepend("-")}"
@get:Internal internal val outputFileNameDot = "$outputFileName.dot"
Expand Down Expand Up @@ -141,12 +141,12 @@ open class DependencyGraphGeneratorExtension(project: Project) {
) {
/** Gradle task name that is associated with this generator. */
@get:Internal val gradleTaskName = "generateProjectDependencyGraph${
name.replaceFirstChar {
when {
it.isLowerCase() -> it.titlecase(Locale.getDefault())
else -> it.toString()
name.replaceFirstChar {
when {
it.isLowerCase() -> it.titlecase(Locale.getDefault())
else -> it.toString()
}
}
}
}"
@get:Internal internal val outputFileName = "project-dependency-graph${name.toHyphenCase().nonEmptyPrepend("-")}"
@get:Internal internal val outputFileNameDot = "$outputFileName.dot"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ internal enum class ProjectTarget(
ids = emptySet(),
color = Color.rgb("#BDBDBD").fill(),
),
;
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,12 @@ class DependencyGraphGeneratorPluginTest {
""".trimMargin(),
)

fun runBuild(): BuildResult {
return GradleRunner.create().withDebug(true)
.withPluginClasspath()
.withGradleVersion(gradleVersion)
.withProjectDir(testProjectDir.root)
.withArguments("generateDependencyGraph", "generateProjectDependencyGraph", "-Dorg.gradle.jvmargs=-Xmx2048m", "--stacktrace")
.build()
}
fun runBuild(): BuildResult = GradleRunner.create().withDebug(true)
.withPluginClasspath()
.withGradleVersion(gradleVersion)
.withProjectDir(testProjectDir.root)
.withArguments("generateDependencyGraph", "generateProjectDependencyGraph", "-Dorg.gradle.jvmargs=-Xmx2048m", "--stacktrace")
.build()

val result = runBuild()
assertEquals(TaskOutcome.SUCCESS, result.task(":generateDependencyGraph")?.outcome)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ class DependencyGraphGeneratorTest {
val dependencyNode: (MutableNode, ResolvedDependency) -> MutableNode = { node, project ->
val random = Random(project.name.hashCode().toLong())
node.add(
Style.FILLED, Color.hsv(random.nextDouble(), random.nextDouble(), random.nextDouble()),
Style.FILLED,
Color.hsv(random.nextDouble(), random.nextDouble(), random.nextDouble()),
)
}

Expand Down
Loading