CompositeBuildIdeaProjectIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Moved some test coverage from `compositeBuilds` to `ide` project.

    • -517
    • +0
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 4 more files in changeset.
Fix composite build IDEA test

    • -4
    • +4
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
Introduce `@ToBeImplemented` (#2643)

The `@ToBeImplemented` annotation replaces Groovy's `@NotYetImplemented`.

The problem with `NotYetImplemented` is that tests marked with it succeed no matter what causes the test to fail. Marked tests can pass because the expected failure is still present (which is the purpose of the test), or if the expected failure is replaced by some other failure.

It's better to write a test that explicitly tests for the expected failure, so when it fails for some other reason, it becomes noticeable. The purpose of the `@ToBeImplemented` annotation is to keep such tests easy to find in the code.

    • -7
    • +18
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 9 more files in changeset.
Use Path instead of ProjectIdentifier for project registry

The use of `ProjectIdentifier` was problematic, in that we were hanging

onto all `DefaultProjectDescriptor` references for the life of the build.

In addition, ProjectIdentifier is not particularly useful as an 'identifier' type.

The registry now contains the identity path for every project in a build,

and can provide a `ProjectComponentIdentifier` instance for each of

these paths.

gradle/composite-builds#37

    • -2
    • +2
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 11 more files in changeset.
Cleanup some stale TODOs

    • -2
    • +1
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 4 more files in changeset.
More tests for IDEA de-duplication in composite

- Test IML dependencies when module names are de-duplicated

- Test de-duplication when not all projects have 'idea' plugin applied.

(Not yet implemented: see gradle/composite-builds#99)

    • -6
    • +73
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 1 more file in changeset.
Test IDE deduplication in composite builds

Adds integration test coverage for de-duplication of IDEA module

names in a composite build.

    • -0
    • +67
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
Simplify IDEA scope mapping

The old scope mapping code was hardcoded, hard to understand and exploded in complexity

each time we added a new configuration to the Java plugin. It was doing this hardcoded

mapping in an attempt to minimize the number of dependency declarations in IDEA, e.g.

remove `testRuntime` dependencies from the `TEST` scope if they were already in the `RUNTIME`

scope and not present in `testCompile`. While this slightly reduces the number of false positives

in auto completion, it is hard to follow, as IDEA itself simply does not differentiate between

"test compilation" and "test runtime".

The new implementation accepts IDEA's dependency model and does the simples possible mapping to it:

- no hardcoded mapping rules for the Java plugin

- users can put dependencies into the 4 IDEA scopes (`COMPILE`,`PROVIDED`,`RUNTIME`, `TEST`)

- the IdeaPlugin uses the same API for adding dependencies that the user would use

- those scopes are not postprocessed in any way

The default mapping for the Java plugin is simplified to:

- `COMPILE` is empty

- `PROVIDED` = `compileClasspath`

- `RUNTIME` = `runtimeClasspath`

- `TEST`= `testCompileClasspath + testRuntimeClasspath`

The benefit of this mapping is that we no longer use `minus` configurations, which we might want

to deprecate/remove as well.

    • -4
    • +4
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 20 more files in changeset.
Fix IDE generation for included builds

The 'jar' task for an included build is no longer executed when

generating the IDE metadata for a composite build. This fixes generation

for projects with dependency cycles.

    • -7
    • +6
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 4 more files in changeset.
Temporarily ignore broken tests

    • -0
    • +4
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
Minor cleanup to test

    • -4
    • +4
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
Extracted some common logic out of composite build integTests

    • -28
    • +8
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 9 more files in changeset.
Clean up a few TODOs

    • -2
    • +2
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 5 more files in changeset.
These tests are no longer cross-version: rename appropriately

    • -0
    • +390
    ./CompositeBuildIdeaProjectIntegrationTest.groovy
  1. … 5 more files in changeset.