Skip to content

Commit

Permalink
fix(deps): update dependency io.github.usefulness:ktlint-gradle-plugi…
Browse files Browse the repository at this point in the history
…n to v0.5.0 (#537)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mateusz Kwieciński <[email protected]>
  • Loading branch information
renovate[bot] and mateuszkwiecinski authored Sep 6, 2023
1 parent c538b4d commit 8135958
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
root = true

[*.{kt, kts}]
[*.{kt,kts}]
max_line_length = 140
indent_size = 4
insert_final_newline = true
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ktlint_standard_property-naming = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal fun Project.configureAndroidCoverage(
val executionData = jacocoTestTaskExtension.destinationFile

val coverageExcludes = excludes + projectExclusions()
val kotlinClassesDir = "$buildDir/tmp/kotlin-classes/${variant.name}"
val kotlinClassesDir = "${layout.buildDirectory.get()}/tmp/kotlin-classes/${variant.name}"
val kotlinTree = fileTree(mapOf("dir" to kotlinClassesDir, "excludes" to coverageExcludes))
val javaTree = fileTree(mapOf("dir" to classesDir, "excludes" to coverageExcludes))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ internal class AndroidLibraryPluginTest : WithGradleProjectTest() {
package com.example
class Test1 {
@org.junit.Test
fun someTest() = Unit
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mavencentral-issuechecker = "0.4.0"
mavencentral-junit = "5.10.0"
mavencentral-assertj = "3.24.2"
mavencentral-jgit = "6.6.1.202309021850-r"
mavencentral-ktlint-gradle = "0.4.1"
mavencentral-ktlint-gradle = "0.5.0"
maven-binarycompatiblity = "0.13.2"
maven-dokka = "1.9.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ internal fun Project.configureMultiplatformCoverage() {
}
tasks.register("jacocoTestReport", JacocoReport::class.java) {
it.dependsOn(":$path:jvmTest")
it.classDirectories.setFrom(buildDir.resolve("classes/kotlin/jvm/main"))
it.classDirectories.setFrom(layout.buildDirectory.map { buildDir -> buildDir.file("classes/kotlin/jvm/main") })
it.sourceDirectories.setFrom(files("src/commonMain/kotlin", "src/jvmMain/kotlin"))
it.executionData.setFrom(buildDir.resolve("jacoco/jvmTest.exec"))
it.executionData.setFrom(layout.buildDirectory.map { buildDir -> buildDir.file("jacoco/jvmTest.exec") })
it.reports.apply {
xml.required.set(true)
html.required.set(true)
Expand Down
10 changes: 4 additions & 6 deletions testing/src/main/kotlin/com/project/starter/Factories.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,22 @@ fun javaClass(className: String) = """
public class $className {
}
""".trimIndent()

// language=kotlin
fun kotlinClass(className: String) = """
package com.example
object $className
""".trimIndent()

// language=kotlin
fun kotlinTestClass(className: String) = """
package com.example
class $className {
class $className {
@org.junit.Test
fun test${className.lowercase()}() = Unit
}
Expand All @@ -33,9 +32,8 @@ fun kotlinTestClass(className: String) = """
// language=kotlin
fun kotlinMultiplatformTestClass(className: String) = """
package com.example
class $className {
class $className {
@kotlin.test.Test
fun test${className.lowercase()}() = Unit
}
Expand Down

0 comments on commit 8135958

Please sign in to comment.