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

org.gradle.api.tasks.testing.Test::useJunit does not have correct type signature #2675

Closed
JLLeitschuh opened this issue Aug 8, 2017 · 0 comments

Comments

@JLLeitschuh
Copy link
Contributor

JLLeitschuh commented Aug 8, 2017

Expected Behavior

org.gradle.api.tasks.testing.Test::useJunit should have have the signature:

public void useJUnit(Action<JUnitOptions> testFrameworkConfigure)

This same problem exists with:

org.gradle.api.tasks.testing.Test::useTestNg

Current Behavior

Currently it has the signature:

public void useJUnit(Action<? super TestFrameworkOptions> testFrameworkConfigure)

Context

In order to configure the JUnitOptions in Kotlin you need to do this:

useJUnit {
    this as JUnitOptions
    excludeCategories("edu.wpi.first.shuffleboard.app.NonHeadlessTests")
}

Steps to Reproduce (for bugs)

Try using this code in any Kotlin project that has the test task configured:

tasks.withType<Test> {
    useJUnit {
        // The line below this won't compile.
        excludeCategories("edu.wpi.first.shuffleboard.app.NonHeadlessTests")
    }
}

Your Environment

  • Build scan URL:

Gradle version 4.1 but this also exists in 4.0.2.

@JLLeitschuh JLLeitschuh changed the title org.gradle.api.tasks.testing.Test::useTestNg does not have correct type signature org.gradle.api.tasks.testing.Test::useJunit does not have correct type signature Aug 8, 2017
JLLeitschuh added a commit to JLLeitschuh/gradle that referenced this issue Aug 8, 2017
@bamboo bamboo closed this as completed in 3379c83 Aug 18, 2017
bamboo added a commit that referenced this issue Aug 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant