Skip to content

Commit

Permalink
fix tests which relied on a third party reporter in jcenter to use a …
Browse files Browse the repository at this point in the history
…third party reporter published to maven central (fixes #771)
  • Loading branch information
wakingrufus committed Aug 30, 2024
1 parent f969ca6 commit d19382e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ gradle-app.setting
# End of https://www.gitignore.io/api/eclipse,gradle,intellij,vim,java

.gradle-test-kit
.obsidian
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]
- Update version for jgit to 5.13.3.202401111512-r [#766](https://github.com/JLLeitschuh/ktlint-gradle/pull/766)

- builds: remove specific lintian version, as latest ubuntu is now a new version
- Update version for jgit to 5.13.3.202401111512-r [#766](https://github.com/JLLeitschuh/ktlint-gradle/pull/766)
- builds: remove specific lintian version, as latest ubuntu is now a new version
[#767](https://github.com/JLLeitschuh/ktlint-gradle/pull/767)
- fix tests which relied on a third party reporter in jcenter [#772]([https://github.com/JLLeitschuh/ktlint-gradle/pull/772](https://github.com/JLLeitschuh/ktlint-gradle/pull/772))

## [12.1.1] - 2024-05-07

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,12 @@ class BuildCacheTest : AbstractPluginTest() {
.appendText(
//language=Groovy
"""
repositories {
jcenter()
}
ktlint.reporters {
reporter "plain"
reporter "checkstyle"
customReporters {
"html" {
fileExtension = "html"
dependency = "me.cassiano:ktlint-html-reporter:0.2.3"
"github" {
dependency = "de.musichin.ktlint.reporter:ktlint-reporter-github:3.1.0"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ class ConfigurationCacheTest : AbstractPluginTest() {
buildGradle.appendText(
//language=Groovy
"""
repositories {
jcenter()
}
ktlint {
relative = true
reporters {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,16 @@ class ReportersTest : AbstractPluginTest() {
@DisplayName("Should create 3rd party report")
@CommonTest
internal fun thirdPartyReport(gradleVersion: GradleVersion) {
// TODO: switch to some 3rd party reporter that is published to Maven Central
project(gradleVersion) {
// https://github.com/mcassiano/ktlint-html-reporter/releases
//language=Groovy
buildGradle.appendText(
"""
repositories {
jcenter()
}
ktlint.reporters {
reporter "checkstyle"
customReporters {
"html" {
fileExtension = "html"
dependency = "me.cassiano:ktlint-html-reporter:0.2.3"
"github" {
dependency = "de.musichin.ktlint.reporter:ktlint-reporter-github:3.1.0"
}
}
}
Expand All @@ -74,7 +67,7 @@ class ReportersTest : AbstractPluginTest() {
assertReportCreated(ReporterType.CHECKSTYLE.fileExtension, mainSourceSetCheckTaskName)
assertReportNotCreated(ReporterType.PLAIN.fileExtension, mainSourceSetCheckTaskName)
assertReportNotCreated(ReporterType.JSON.fileExtension, mainSourceSetCheckTaskName)
assertReportCreated("html", mainSourceSetCheckTaskName)
assertReportCreated("github", mainSourceSetCheckTaskName)
}
}
}
Expand Down

0 comments on commit d19382e

Please sign in to comment.