-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed usage Kover Gradle Plugin in buildSrc directory
`kotlin-dsl` itself specifies the language version to ensure compatibility of the Kotlin DSL API. Since we ourselves guarantee and test compatibility with previous Gradle versions, we can override language version The easiest way to do this now is to specify the version in the `afterEvaluate` block Fixes #415 PR #432 Co-authored-by: Leonid Startsev <sandwwraith@users.noreply.github.com>
- Loading branch information
1 parent
867d8bd
commit 3e2aeca
Showing
14 changed files
with
205 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...st/kotlin/kotlinx/kover/gradle/plugin/test/functional/cases/MetadataCompatibilityTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package kotlinx.kover.gradle.plugin.test.functional.cases | ||
|
||
import kotlinx.kover.gradle.plugin.test.functional.framework.checker.CheckerContext | ||
import kotlinx.kover.gradle.plugin.test.functional.framework.starter.TemplateTest | ||
|
||
internal class MetadataCompatibilityTests { | ||
|
||
@TemplateTest("buildsrc-usage", [":koverXmlReport"]) | ||
fun CheckerContext.test() { | ||
// no-op | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
kover-gradle-plugin/src/functionalTest/templates/builds/buildsrc-usage/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plugins { | ||
kotlin("jvm") version "1.4.20" | ||
} | ||
|
||
apply(plugin = "org.jetbrains.kotlinx.kover") | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
testImplementation("org.junit.jupiter:junit-jupiter:5.8.0") | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
...radle-plugin/src/functionalTest/templates/builds/buildsrc-usage/buildSrc/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
plugins { | ||
kotlin("jvm") version "1.4.20" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:TEST") | ||
} |
2 changes: 2 additions & 0 deletions
2
...ugin/src/functionalTest/templates/builds/buildsrc-usage/buildSrc/src/main/kotlin/Usage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Class { | ||
} |
1 change: 1 addition & 0 deletions
1
kover-gradle-plugin/src/functionalTest/templates/builds/buildsrc-usage/requires
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
MAX_GRADLE=8.0 |
8 changes: 8 additions & 0 deletions
8
kover-gradle-plugin/src/functionalTest/templates/builds/buildsrc-usage/settings.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
mavenCentral() | ||
} | ||
} | ||
rootProject.name = "buildsrc-usage" | ||
|
9 changes: 9 additions & 0 deletions
9
...plugin/src/functionalTest/templates/builds/buildsrc-usage/src/main/kotlin/ExampleClass.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class ExampleClass { | ||
fun example() { | ||
println("example") | ||
} | ||
|
||
fun unused() { | ||
println("unused") | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...le-plugin/src/functionalTest/templates/builds/buildsrc-usage/src/test/kotlin/TestClass.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import org.junit.jupiter.api.Test | ||
|
||
class TestClass { | ||
@Test | ||
fun testBranches() { | ||
ExampleClass().example() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters