Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2702

testRuntime/testCompile configuration resolved even if there are no tests

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7-rc-1

      Description

      Currently, Gradle resolves the testCompile and testRuntime configurations even when there are no tests. Basically, the test task runs even if there are no tests, the empty report is generated, etc. Ideally, the test task is skipped if there is no input (no tests).

        Activity

        szczepiq Szczepan Faber created issue -
        szczepiq Szczepan Faber made changes -
        Field Original Value New Value
        Summary testRuntime configuration should not be resolved when there are no tests testRuntime/testCompile configuration resolved even if there are no tests
        Description Currently, Gradle resolves the testRuntime configuration even when there are no tests.

        We should look into marking getCandidateClassFiles() with @SkipWhenEmpty. However, this currently does not work because @SkipWhenEmpty clashes with @Input annotation.
        Currently, Gradle resolves the testCompile and testRuntime configurations even when there are no tests. Basically, the test task runs even if there are no tests, the empty report is generated, etc. Ideally, the test task is skipped if there is no input (no tests).
        szczepiq Szczepan Faber made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Szczepan Faber [ szczepiq ]
        Fix Version/s 1.7-rc-1 [ 10675 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            szczepiq Szczepan Faber
            Reporter:
            szczepiq Szczepan Faber
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development