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

Fixed Gradle 9.0 migration issue #723

Merged
merged 1 commit into from
Jan 6, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2017-2025 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

package kotlinx.kover.gradle.plugin.test.functional.cases

import kotlinx.kover.gradle.plugin.test.functional.framework.configurator.BuildConfigurator
import kotlinx.kover.gradle.plugin.test.functional.framework.starter.GeneratedTest
import kotlin.test.assertFalse

internal class CompatibilityTests {

@GeneratedTest
fun BuildConfigurator.testGradle9Compatibility() {
addProjectWithKover {
sourcesFrom("simple")
}

run("test") {
assertFalse(output.contains("Deprecated Gradle features were used in this build"), "There should be no deprecated Gradle features")
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ public class KoverSettingsGradlePlugin: Plugin<Settings> {

val agentDependency = configurations.create(SettingsNames.DEPENDENCY_AGENT) {
asDependency()
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named(KoverUsageAttr.VALUE))
}
}
dependencies.add(agentDependency.name, rootProject)

Expand All @@ -78,9 +75,6 @@ public class KoverSettingsGradlePlugin: Plugin<Settings> {

val dependencyConfig = configurations.create(KOVER_DEPENDENCY_NAME) {
asDependency()
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named(KoverUsageAttr.VALUE))
}
}

val eachProjectRules = mutableMapOf<String, List<ProjectVerificationRuleSettingsImpl>>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ import org.gradle.kotlin.dsl.register
internal fun prepare(project: Project): KoverContext {
val koverBucketConfiguration = project.configurations.create(KOVER_DEPENDENCY_NAME) {
asBucket()
attributes {
attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(KoverUsageAttr.VALUE))
}
}

// Project always consumes its own artifacts
Expand Down