Skip to content

Commit

Permalink
Implemented Kover API version 2
Browse files Browse the repository at this point in the history
Resolves #19
Resolves #128
Resolves #168

Also:
- Kotlin version upgraded to 1.7.10
- Agent version upgraded to 1.0.675
- instrumentation config added to the test framework
- added test on instrumentation config

Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
  • Loading branch information
shanshin and qwwdfsad committed Aug 1, 2022
1 parent d9e1369 commit 6d6ca6c
Show file tree
Hide file tree
Showing 87 changed files with 4,427 additions and 2,904 deletions.
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

0 comments on commit 6d6ca6c

Please sign in to comment.