Skip to content
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

Designed and implemented Kover API version 2 #190

Merged
merged 10 commits into from Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
541 changes: 295 additions & 246 deletions README.md

Large diffs are not rendered by default.

19 changes: 13 additions & 6 deletions build.gradle.kts
@@ -1,5 +1,7 @@
import org.jetbrains.kotlin.gradle.plugin.*

plugins {
kotlin("jvm") version "1.6.10"
kotlin("jvm") version "1.7.10"

`java-gradle-plugin`
`maven-publish`
Expand All @@ -19,21 +21,26 @@ sourceSets {
}
}

// adding the ability to use internal classes inside functional tests
kotlin.target.compilations.run {
getByName("functionalTest").associateWith(getByName(KotlinCompilation.MAIN_COMPILATION_NAME))
}

dependencies {
implementation(gradleApi())
// exclude transitive dependency on stdlib, the Gradle version should be used
compileOnly(kotlin("stdlib"))

compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:${property("kotlin.version")}")
compileOnly("com.android.tools.build:gradle:4.2.2")

testImplementation(kotlin("test"))

"functionalTestImplementation"(gradleTestKit())
// dependencies only for plugin's classpath to work with Kotlin Multi-Platform and Android plugins
"functionalTestCompileOnly"("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
"functionalTestCompileOnly"("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.10")
"functionalTestCompileOnly"("org.jetbrains.kotlin:kotlin-compiler-runner:1.6.10")
"functionalTestCompileOnly"("org.jetbrains.kotlin:kotlin-gradle-plugin:${property("kotlin.version")}")
"functionalTestCompileOnly"("org.jetbrains.kotlin:kotlin-compiler-embeddable:${property("kotlin.version")}")
"functionalTestCompileOnly"("org.jetbrains.kotlin:kotlin-compiler-runner:${property("kotlin.version")}")
}

java {
Expand Down Expand Up @@ -73,7 +80,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach
// Kover works with the stdlib of at least version `1.4.x`
languageVersion = "1.4"
apiVersion = "1.4"
// Kotlin compiler 1.6 issues a warning if `languageVersion` or `apiVersion` 1.4 is used - suppress it
// Kotlin compiler 1.7 issues a warning if `languageVersion` or `apiVersion` 1.4 is used - suppress it
freeCompilerArgs = freeCompilerArgs + "-Xsuppress-version-warnings"
}
}
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/PublicationMavenCentral.kt
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2017-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.gradle.api.*
Expand Down