Repository: jeremymailen/kotlinter-gradle
Pull request #285 (2022-09-28 06:42:32)

Migrate to JUnit5 + bump AGP to 7.3.0 + bump Kotlin to 1.7.20
In #279, I'll want to temporarily disable some tests onWindows due to Gradle test-kit bug: https://github.com/gradle/gradle/issues/21964 
JUnit5 has a dedicated [DisabledOnOs](https://junit.org/junit5/docs/5.2.0/api/org/junit/jupiter/api/condition/DisabledOnOs.html) annotation, so I'm proposing to upgrate test suite to run with JUnit5, which would be nice to do even if I didn't need the new annotation :)

mateuszkwiecinski: Ehh... :/ https://github.com/junit-team/junit5/issues/2811
mateuszkwiecinski: >I assume no plugin compatibility changes here? User will not need to be on later versions of kotlin or agp?

No changes needed, we should be all good. Kotlin 1.7.20 is backwards compatible and AGP isn't exposed as a public dependency, we'll always use the one provided by the consumer build (that's why I pushed for testing against various AGP versions)

<img width="447" alt="image" src="https://user-images.githubusercontent.com/36954793/193620782-b93da867-4f6b-4b9a-8417-d93811593aba.png">


Patch:
diff --git a/build.gradle.kts b/build.gradle.kts
index 9ec3df1..a49a4ca 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 plugins {
-    kotlin("jvm") version "1.7.10"
+    kotlin("jvm") version "1.7.20"
     id("com.gradle.plugin-publish") version "0.21.0"
     `java-gradle-plugin`
     `maven-publish`
@@ -25,8 +25,8 @@ group = "org.jmailen.gradle"
 description = projectDescription
 
 object Versions {
-    const val androidTools = "7.2.2"
-    const val junit = "4.13.2"
+    const val androidTools = "7.3.0"
+    const val junit = "5.9.1"
     const val ktlint = "0.47.1"
     const val mockitoKotlin = "4.0.0"
 }
@@ -66,7 +66,9 @@ dependencies {
         implementation("com.pinterest.ktlint:$module:${Versions.ktlint}")
     }
 
-    testImplementation("junit:junit:${Versions.junit}")
+    testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Versions.junit}")
+    testImplementation("org.junit.jupiter:junit-jupiter-api:${Versions.junit}")
+    implementation("commons-io:commons-io:2.11.0")
     testImplementation("org.mockito.kotlin:mockito-kotlin:${Versions.mockitoKotlin}")
 }
 
@@ -103,6 +105,9 @@ tasks {
             jvmTarget = targetJavaVersion.toString()
         }
     }
+    withType<Test>().configureEach {
+        useJUnitPlatform()
+    }
 
     // Required to put the Kotlin plugin on the classpath for the functional test suite
     withType<PluginUnderTestMetadata>().configureEach {


Test patch:
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/AndroidProjectTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/AndroidProjectTest.kt
index 4f7065b..dda393d 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/AndroidProjectTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/AndroidProjectTest.kt
@@ -4,18 +4,18 @@ import org.gradle.testkit.runner.TaskOutcome
 import org.jmailen.gradle.kotlinter.functional.utils.androidManifest
 import org.jmailen.gradle.kotlinter.functional.utils.kotlinClass
 import org.jmailen.gradle.kotlinter.functional.utils.resolve
-import org.junit.Assert.assertEquals
-import org.junit.Before
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Test
 import java.io.File
 
 internal class AndroidProjectTest : WithGradleTest.Android() {
 
     private lateinit var androidModuleRoot: File
 
-    @Before
+    @BeforeEach
     fun setUp() {
-        testProjectDir.root.apply {
+        testProjectDir.apply {
             resolve("settings.gradle") { writeText(settingsFile) }
             resolve("build.gradle") {
                 // language=groovy
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/CustomTaskTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/CustomTaskTest.kt
index 1a869bf..6bfa46b 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/CustomTaskTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/CustomTaskTest.kt
@@ -5,20 +5,20 @@ import org.jmailen.gradle.kotlinter.functional.utils.editorConfig
 import org.jmailen.gradle.kotlinter.functional.utils.kotlinClass
 import org.jmailen.gradle.kotlinter.functional.utils.resolve
 import org.jmailen.gradle.kotlinter.functional.utils.settingsFile
-import org.junit.Assert.assertArrayEquals
-import org.junit.Assert.assertEquals
-import org.junit.Assert.assertTrue
-import org.junit.Before
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertArrayEquals
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Test
 import java.io.File
 
 class CustomTaskTest : WithGradleTest.Kotlin() {
 
     lateinit var projectRoot: File
 
-    @Before
+    @BeforeEach
     fun setUp() {
-        projectRoot = testProjectDir.root.apply {
+        projectRoot = testProjectDir.apply {
             resolve("settings.gradle") { writeText(settingsFile) }
             resolve("build.gradle") {
                 // language=groovy
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/EditorConfigTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/EditorConfigTest.kt
index 0bac4dc..7e96c65 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/EditorConfigTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/EditorConfigTest.kt
@@ -5,20 +5,20 @@ import org.jmailen.gradle.kotlinter.functional.utils.editorConfig
 import org.jmailen.gradle.kotlinter.functional.utils.kotlinClass
 import org.jmailen.gradle.kotlinter.functional.utils.resolve
 import org.jmailen.gradle.kotlinter.functional.utils.settingsFile
-import org.junit.Assert.assertEquals
-import org.junit.Assert.assertFalse
-import org.junit.Assert.assertTrue
-import org.junit.Before
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Assertions.assertFalse
+import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Test
 import java.io.File
 
 internal class EditorConfigTest : WithGradleTest.Kotlin() {
 
     lateinit var projectRoot: File
 
-    @Before
+    @BeforeEach
     fun setUp() {
-        projectRoot = testProjectDir.root.apply {
+        projectRoot = testProjectDir.apply {
             resolve("settings.gradle") { writeText(settingsFile) }
             resolve("build.gradle") {
                 // language=groovy
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/ExtensionTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/ExtensionTest.kt
index 5cd2bd8..42521ed 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/ExtensionTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/ExtensionTest.kt
@@ -4,19 +4,19 @@ import org.gradle.testkit.runner.TaskOutcome
 import org.jmailen.gradle.kotlinter.functional.utils.kotlinClass
 import org.jmailen.gradle.kotlinter.functional.utils.resolve
 import org.jmailen.gradle.kotlinter.functional.utils.settingsFile
-import org.junit.Assert.assertEquals
-import org.junit.Assert.assertTrue
-import org.junit.Before
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Test
 import java.io.File
 
 internal class ExtensionTest : WithGradleTest.Kotlin() {
 
     lateinit var projectRoot: File
 
-    @Before
+    @BeforeEach
     fun setUp() {
-        projectRoot = testProjectDir.root.apply {
+        projectRoot = testProjectDir.apply {
             resolve("settings.gradle") { writeText(settingsFile) }
             resolve("build.gradle") {
                 // language=groovy
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/InstallHookTaskTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/InstallHookTaskTest.kt
index ebbc580..85c8ae6 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/InstallHookTaskTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/InstallHookTaskTest.kt
@@ -5,11 +5,11 @@ import org.gradle.testkit.runner.TaskOutcome.UP_TO_DATE
 import org.jmailen.gradle.kotlinter.functional.utils.resolve
 import org.jmailen.gradle.kotlinter.functional.utils.settingsFile
 import org.jmailen.gradle.kotlinter.tasks.InstallHookTask
-import org.junit.Assert.assertEquals
-import org.junit.Assert.assertFalse
-import org.junit.Assert.assertTrue
-import org.junit.Before
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Assertions.assertFalse
+import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Test
 import java.io.File
 
 abstract class InstallHookTaskTest(
@@ -18,9 +18,9 @@ abstract class InstallHookTaskTest(
 ) : WithGradleTest.Kotlin() {
     private lateinit var projectRoot: File
 
-    @Before
+    @BeforeEach
     fun setup() {
-        projectRoot = testProjectDir.root.apply {
+        projectRoot = testProjectDir.apply {
             resolve("settings.gradle") { writeText(settingsFile) }
             resolve("build.gradle") {
                 writeText(
@@ -39,11 +39,11 @@ abstract class InstallHookTaskTest(
 
     @Test
     fun `installs hook in project without hook directory`() {
-        File(testProjectDir.root, ".git").apply { mkdir() }
+        File(testProjectDir, ".git").apply { mkdir() }
 
         build(taskName).apply {
             assertEquals(SUCCESS, task(":$taskName")?.outcome)
-            testProjectDir.root.apply {
+            testProjectDir.apply {
                 resolve(".git/hooks/$hookFile") {
                     assertTrue(readText().contains("${'$'}GRADLEW formatKotlin"))
                     assertTrue(canExecute())
@@ -59,14 +59,14 @@ abstract class InstallHookTaskTest(
                 #!/bin/bash
                 This is some existing hook
             """.trimIndent()
-        File(testProjectDir.root, ".git/hooks").apply { mkdirs() }
-        File(testProjectDir.root, ".git/hooks/$hookFile").apply {
+        File(testProjectDir, ".git/hooks").apply { mkdirs() }
+        File(testProjectDir, ".git/hooks/$hookFile").apply {
             writeText(existingHook)
         }
 
         build(taskName).apply {
             assertEquals(SUCCESS, task(":$taskName")?.outcome)
-            testProjectDir.root.apply {
+            testProjectDir.apply {
                 resolve(".git/hooks/$hookFile") {
                     val hookContents = readText()
                     assertTrue(hookContents.startsWith(existingHook))
@@ -79,8 +79,8 @@ abstract class InstallHookTaskTest(
     @Test
     fun `updates previously installed kotlinter hook`() {
         val placeholder = "Not actually the hook, just a placeholder"
-        File(testProjectDir.root, ".git/hooks").apply { mkdirs() }
-        File(testProjectDir.root, ".git/hooks/$hookFile").apply {
+        File(testProjectDir, ".git/hooks").apply { mkdirs() }
+        File(testProjectDir, ".git/hooks/$hookFile").apply {
             writeText(
                 """
                 ${InstallHookTask.startHook}
@@ -92,7 +92,7 @@ abstract class InstallHookTaskTest(
 
         build(taskName).apply {
             assertEquals(SUCCESS, task(":$taskName")?.outcome)
-            testProjectDir.root.apply {
+            testProjectDir.apply {
                 resolve(".git/hooks/$hookFile") {
                     val hookContents = readText()
                     assertTrue(hookContents.contains("${'$'}GRADLEW formatKotlin"))
@@ -104,11 +104,11 @@ abstract class InstallHookTaskTest(
 
     @Test
     fun `up-to-date when after hook installed`() {
-        File(testProjectDir.root, ".git").apply { mkdir() }
+        File(testProjectDir, ".git").apply { mkdir() }
         lateinit var hookContent: String
         build(taskName).apply {
             assertEquals(SUCCESS, task(":$taskName")?.outcome)
-            testProjectDir.root.apply {
+            testProjectDir.apply {
                 resolve(".git/hooks/$hookFile") {
                     hookContent = readText()
                     println(hookContent)
@@ -120,7 +120,7 @@ abstract class InstallHookTaskTest(
 
         build(taskName).apply {
             assertEquals(UP_TO_DATE, task(":$taskName")?.outcome)
-            testProjectDir.root.apply {
+            testProjectDir.apply {
                 resolve(".git/hooks/$hookFile") {
                     assertEquals(hookContent, readText())
                 }
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/KotlinProjectTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/KotlinProjectTest.kt
index 9b606d6..f1d0def 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/KotlinProjectTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/KotlinProjectTest.kt
@@ -4,10 +4,10 @@ import org.gradle.testkit.runner.TaskOutcome.FAILED
 import org.gradle.testkit.runner.TaskOutcome.SUCCESS
 import org.gradle.testkit.runner.TaskOutcome.UP_TO_DATE
 import org.jmailen.gradle.kotlinter.functional.utils.editorConfig
-import org.junit.Assert.assertEquals
-import org.junit.Assert.assertTrue
-import org.junit.Before
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Test
 import java.io.File
 
 internal class KotlinProjectTest : WithGradleTest.Kotlin() {
@@ -18,12 +18,12 @@ internal class KotlinProjectTest : WithGradleTest.Kotlin() {
     private lateinit var editorconfigFile: File
     private val pathPattern = "(.*\\.kt):\\d+:\\d+".toRegex()
 
-    @Before
+    @BeforeEach
     fun setup() {
-        settingsFile = testProjectDir.newFile("settings.gradle")
-        buildFile = testProjectDir.newFile("build.gradle")
-        sourceDir = testProjectDir.newFolder("src", "main", "kotlin")
-        editorconfigFile = testProjectDir.newFile(".editorconfig")
+        settingsFile = testProjectDir.resolve("settings.gradle")
+        buildFile = testProjectDir.resolve("build.gradle")
+        sourceDir = testProjectDir.resolve("src/main/kotlin/").also(File::mkdirs)
+        editorconfigFile = testProjectDir.resolve(".editorconfig")
     }
 
     @Test
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/ModifiedSourceSetsTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/ModifiedSourceSetsTest.kt
index c11fc96..fb1e97a 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/ModifiedSourceSetsTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/ModifiedSourceSetsTest.kt
@@ -4,9 +4,9 @@ import org.gradle.testkit.runner.TaskOutcome
 import org.jmailen.gradle.kotlinter.functional.utils.androidManifest
 import org.jmailen.gradle.kotlinter.functional.utils.kotlinClass
 import org.jmailen.gradle.kotlinter.functional.utils.resolve
-import org.junit.Assert.assertEquals
-import org.junit.Before
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Test
 import java.io.File
 
 internal class ModifiedSourceSetsTest : WithGradleTest.Android() {
@@ -14,9 +14,9 @@ internal class ModifiedSourceSetsTest : WithGradleTest.Android() {
     private lateinit var androidModuleRoot: File
     private lateinit var kotlinModuleRoot: File
 
-    @Before
+    @BeforeEach
     fun setUp() {
-        testProjectDir.root.apply {
+        testProjectDir.apply {
             resolve("settings.gradle") { writeText(settingsFile) }
             resolve("build.gradle") {
                 // language=groovy
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/WithGradleTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/WithGradleTest.kt
index f38c829..a9c0370 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/WithGradleTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/functional/WithGradleTest.kt
@@ -1,16 +1,31 @@
 package org.jmailen.gradle.kotlinter.functional
 
+import org.apache.commons.io.FileUtils
 import org.gradle.internal.classpath.DefaultClassPath
 import org.gradle.testkit.runner.BuildResult
 import org.gradle.testkit.runner.GradleRunner
 import org.gradle.testkit.runner.internal.PluginUnderTestMetadataReading
-import org.junit.Rule
-import org.junit.rules.TemporaryFolder
+import org.junit.jupiter.api.AfterEach
+import org.junit.jupiter.api.BeforeEach
+import java.io.File
+import java.nio.file.Files
 
 abstract class WithGradleTest {
 
-    @get:Rule
-    val testProjectDir = TemporaryFolder()
+    lateinit var testProjectDir: File
+
+    /**
+     * Not using JUnit's @TempDir, due do https://github.com/gradle/gradle/issues/12535
+     */
+    @BeforeEach
+    internal fun setUpTempdir() {
+        testProjectDir = Files.createTempDirectory(this::class.java.simpleName).toFile()
+    }
+
+    @AfterEach
+    internal fun cleanUpTempdir() {
+        FileUtils.forceDeleteOnExit(testProjectDir)
+    }
 
     protected fun build(vararg args: String): BuildResult = gradleRunnerFor(*args).build()
 
@@ -45,6 +60,6 @@ abstract class WithGradleTest {
 
 private fun WithGradleTest.defaultRunner(vararg args: String) =
     GradleRunner.create()
-        .withProjectDir(testProjectDir.root)
+        .withProjectDir(testProjectDir)
         .withArguments(args.toList() + listOf("--stacktrace", "--configuration-cache"))
         .forwardOutput()
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/support/ReportersTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/support/ReportersTest.kt
index 9c84457..cccf27c 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/support/ReportersTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/support/ReportersTest.kt
@@ -1,7 +1,8 @@
 package org.jmailen.gradle.kotlinter.support
 
-import org.junit.Assert.assertEquals
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.assertThrows
 import java.io.File
 
 class ReportersTest {
@@ -15,9 +16,9 @@ class ReportersTest {
         assertEquals("html", reporterFileExtension("html"))
     }
 
-    @Test(expected = IllegalArgumentException::class)
+    @Test
     fun testUnknownReporterExtension() {
-        reporterFileExtension("unknown")
+        assertThrows<IllegalArgumentException> { reporterFileExtension("unknown") }
     }
 
     @Test
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/support/RuleSetsTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/support/RuleSetsTest.kt
index d6f59bd..033989d 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/support/RuleSetsTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/support/RuleSetsTest.kt
@@ -4,9 +4,9 @@ import com.pinterest.ktlint.core.KtLint
 import com.pinterest.ktlint.core.Rule
 import com.pinterest.ktlint.core.RuleProvider
 import com.pinterest.ktlint.core.RuleSetProviderV2
-import org.junit.Assert.assertEquals
-import org.junit.Assert.assertTrue
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.Test
 
 class RuleSetsTest {
 
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/support/SortedThreadSafeReporterWrapperTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/support/SortedThreadSafeReporterWrapperTest.kt
index a48b5cc..c1b32a2 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/support/SortedThreadSafeReporterWrapperTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/support/SortedThreadSafeReporterWrapperTest.kt
@@ -2,8 +2,8 @@ package org.jmailen.gradle.kotlinter.support
 
 import com.pinterest.ktlint.core.LintError
 import com.pinterest.ktlint.core.Reporter
-import org.junit.Before
-import org.junit.Test
+import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Test
 import org.mockito.Mockito.verify
 import org.mockito.kotlin.inOrder
 import org.mockito.kotlin.mock
@@ -15,7 +15,7 @@ class SortedThreadSafeReporterWrapperTest {
 
     private lateinit var reporter: SortedThreadSafeReporterWrapper
 
-    @Before
+    @BeforeEach
     fun setUp() {
         wrapped = mock()
 
diff --git a/src/test/kotlin/org/jmailen/gradle/kotlinter/tasks/GenerateHookTest.kt b/src/test/kotlin/org/jmailen/gradle/kotlinter/tasks/GenerateHookTest.kt
index b83de3b..43f9bff 100644
--- a/src/test/kotlin/org/jmailen/gradle/kotlinter/tasks/GenerateHookTest.kt
+++ b/src/test/kotlin/org/jmailen/gradle/kotlinter/tasks/GenerateHookTest.kt
@@ -1,8 +1,8 @@
 package org.jmailen.gradle.kotlinter.tasks
 
-import org.junit.Assert.assertFalse
-import org.junit.Assert.assertTrue
-import org.junit.Test
+import org.junit.jupiter.api.Assertions.assertFalse
+import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.Test
 
 internal class GenerateHookTest {
     private val gradlew = "gradlewLocation"
diff --git a/test-project-android/build.gradle.kts b/test-project-android/build.gradle.kts
index 1ea19b7..c2454e8 100644
--- a/test-project-android/build.gradle.kts
+++ b/test-project-android/build.gradle.kts
@@ -1,5 +1,5 @@
 plugins {
-    kotlin("android") version "1.7.10"
+    kotlin("android") version "1.7.20"
     id("com.android.library")
     id("org.jmailen.kotlinter")
 }
diff --git a/test-project/build.gradle.kts b/test-project/build.gradle.kts
index afb5c45..c7c729c 100644
--- a/test-project/build.gradle.kts
+++ b/test-project/build.gradle.kts
@@ -1,4 +1,4 @@
 plugins {
-    kotlin("jvm") version "1.7.10"
+    kotlin("jvm") version "1.7.20"
     id("org.jmailen.kotlinter")
 }