-
Notifications
You must be signed in to change notification settings - Fork 165
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
bump kotlin to 1.5.31, bump ktlint to 0.43.2 #597
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,22 +10,11 @@ import org.jlleitschuh.gradle.ktlint.testdsl.build | |
import org.jlleitschuh.gradle.ktlint.testdsl.project | ||
import org.junit.jupiter.api.DisplayName | ||
|
||
@GradleTestVersions(minVersion = "6.6.1") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is no longer needed, because min gradle version is 6.8 |
||
@GradleTestVersions | ||
class ConfigurationCacheTest : AbstractPluginTest() { | ||
private val configurationCacheFlag = "--configuration-cache" | ||
private val configurationCacheWarnFlag = "--configuration-cache-problems=warn" | ||
|
||
/** | ||
* 2 warnings are still reported by the Kotlin plugin. We can't fix them. | ||
* But make sure we aren't creating more issues. | ||
* ``` | ||
* 2 problems were found storing the configuration cache, 1 of which seems unique. | ||
* plugin 'org.jetbrains.kotlin.jvm': registration of listener on 'Gradle.addBuildListener' is unsupported | ||
* See https://docs.gradle.org/6.6-milestone-3/userguide/configuration_cache.html#config_cache:requirements:build_listeners | ||
* ``` | ||
*/ | ||
private val maxProblemsFlag = "-Dorg.gradle.unsafe.configuration-cache.max-problems=2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure if it is still applicable, I run the tests with the value set to 0 and everything worked correctly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to restore and set the value to 0? |
||
|
||
@DisplayName("Should support configuration cache without errors on running linting") | ||
@CommonTest | ||
internal fun configurationCacheForCheckTask(gradleVersion: GradleVersion) { | ||
|
@@ -34,14 +23,13 @@ class ConfigurationCacheTest : AbstractPluginTest() { | |
"src/main/kotlin/clean-source.kt", | ||
""" | ||
val foo = "bar" | ||
|
||
""".trimIndent() | ||
) | ||
|
||
build( | ||
configurationCacheFlag, | ||
configurationCacheWarnFlag, | ||
maxProblemsFlag, | ||
CHECK_PARENT_TASK_NAME | ||
) { | ||
assertThat(task(":$mainSourceSetCheckTaskName")?.outcome).isEqualTo(TaskOutcome.SUCCESS) | ||
|
@@ -50,7 +38,6 @@ class ConfigurationCacheTest : AbstractPluginTest() { | |
build( | ||
configurationCacheFlag, | ||
configurationCacheWarnFlag, | ||
maxProblemsFlag, | ||
CHECK_PARENT_TASK_NAME | ||
) { | ||
assertThat(task(":$mainSourceSetCheckTaskName")?.outcome).isEqualTo(TaskOutcome.UP_TO_DATE) | ||
|
@@ -74,7 +61,6 @@ class ConfigurationCacheTest : AbstractPluginTest() { | |
build( | ||
configurationCacheFlag, | ||
configurationCacheWarnFlag, | ||
maxProblemsFlag, | ||
FORMAT_PARENT_TASK_NAME | ||
) { | ||
assertThat(task(":$formatTaskName")?.outcome).isEqualTo(TaskOutcome.SUCCESS) | ||
|
@@ -84,7 +70,6 @@ class ConfigurationCacheTest : AbstractPluginTest() { | |
build( | ||
configurationCacheFlag, | ||
configurationCacheWarnFlag, | ||
maxProblemsFlag, | ||
FORMAT_PARENT_TASK_NAME | ||
) { | ||
assertThat(task(":$formatTaskName")?.outcome).isEqualTo(TaskOutcome.SUCCESS) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this consistent with the Android Gradle Plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I am not sure what you mean, but we need at least 6.8 version of gradle to make it work with ktlint
0.43.2
.Here is the table