ModuleDependencyBuilderTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Change `ProjectComponentIdentifier` and `ProjectComponentSelector` implementations to carry enough information to report the correct display name and project name. Change more places to delegate to the `BuildState` for a particular build to determine these values for a given project, rather than duplicating the logic to calculate these things.

  1. … 43 more files in changeset.
Move knowledge of whether an IDE project should or should not be included in a generated IDE workspace into the `IdeArtifactRegistry`. Change `ProjectStateRegistry` so that it does not need to care whether a project belongs to an implicitly defined build or not.

This change also includes some method renames for clarity.

  1. … 23 more files in changeset.
Changed IDE plugins so that they use strongly typed objects across Gradle project boundaries to describe the IDE projects produced for the project, rather than attempting to encode information into file names and existing `PublishArtifact` properties.

Changed the Eclipse and Visual Studio plugins to expose a single IDE project object rather than a bunch of individual "artifacts" across project boundaries. In particular, the Visual Studio plugin no longer exposes artificial artifacts to describe each configuration of the Visual Studio project.

  1. … 27 more files in changeset.
Changed the IDEA plugin to use the same API to determine the IDEA modules to include in the IDEA project as the Xcode and Visual Studio plugins use to determine the projects to include their workspaces, rather than include two not-quite-the-same duplicate implementations of this logic in the IDEA plugin.

Changed all IDE plugins to consistently use `IdeArtifactRegistry` to cross project boundaries, rather than sometimes using this and sometimes reaching down into dependency management internals (the registry implementation still does this, but at least it's in one spot now).

  1. … 16 more files in changeset.
Make IDE dependency generation more efficient

Only do a single query to collect project, module

and file dependencies. Get rid of the intermediate

object model and use a visitor pattern to adapt the

data to the specific IDE models instead.

  1. … 33 more files in changeset.
Removed `CompositeBuildIdeProjectResovler`

Moved the single 'findArtifact` method to `LocalComponentRegistry`, so

that this additional service is no longer required.

  1. … 11 more files in changeset.
Moved core included-build types into separate packages

- org.gradle.initialization.[Configurable]IncludedBuild -> org.gradle.includedbuild.[Configurable]IncludedBuild

- org.gradle.initialization.includedbuild.* -> org.gradle.includedbuild.internal.*

Better names

  1. … 63 more files in changeset.
Used shared instance of IncludedBuildTaskGraph in CompositeBuildIdeProjectResolver

  1. … 4 more files in changeset.
Moved core included build API types into separate package

  1. … 28 more files in changeset.
Execute tasks for included builds in a separate thread

IncludedBuildController allows tasks to be queued for execution,

and once started will loop and attempt to execute all queued

tasks. This execution loop is performed in a dedicated thread,

with the threads from dependent tasks blocking until the

required task is completed.

This mechanism will permit included build tasks to be executed

in parallel with other included builds, and will also naturally

lead to a separate build operation hierarchy for included build

tasks.

  1. … 12 more files in changeset.
Simplified resolving name of dependent IDE module

For any project that has the appropriate IDE plugin applied, the

name will be taken from the 'published' IDE metadata artifact.

For a project without the IDE plugin applied, we derive the project

name from the project path.

    • -3
    • +15
    ./ModuleDependencyBuilderTest.groovy
  1. … 4 more files in changeset.
Merge release into master

  1. … 10 more files in changeset.
Revert De-duplicate commonly used immutable objects in dependency resolution and IDE changes

Commits reverted:

- 807b1e4f8d1585d93c1de3e9ca83d99d0819e2d2

- 9482b0b05374253cafdb776550d7016385912e04

- 4ecead06b53ec6b0f15c517bf0d0c6a74c3b3c05

- db1135a8a5f1c507e0df3c03ad12ddc963799e4d

- 7350bcbae30a777909cec74ebfd5a91d2c89081e

Additionally, minor changes to avoid usage of introduced

classes and methods from subsequent commits.

Issue: gradle/gradle-private#563

  1. … 109 more files in changeset.
Use typed parameters in service constructor

+review REVIEW-6325

  1. … 5 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.

  1. … 4 more files in changeset.
Moved type into `:compositeBuilds`

This will allow the `CompositeBuildIdeProjectResolver` to use other

composite-build specific types.

  1. … 9 more files in changeset.
De-duplicate (= intern) some instances in dependency resolution

- Reduce memory usage of dependency resolution by de-duplicating the

most commonly used immutable instances.

- Objects aren't strictly immutable: displayName is calculated lazily

- solution is thread-safe without synchronization

- lazy calculation is needed for efficient interning since a lookup

will always create a new instance.

- Use strong references in some instance interners

- strong references cause less GC overhead than weak references

- Strong references:

DefaultModuleIdentifier

DefaultModuleVersionIdentifier

DefaultModuleVersionSelector

DefaultModuleComponentIdentifier

DefaultModuleComponentSelector

DefaultProjectComponentSelector

- Weak references:

DefaultLibraryBinaryIdentifier

DefaultLibraryComponentSelector

DefaultIvyArtifactName

- Both reference types:

DefaultBuildIdentifier

DefaultProjectComponentIdentifier

- The reason for special handing is that DefaultBuildIdentifier

has a state field "current" as part of the instance which

isn't part of equals/hashCode.

+review REVIEW-6277

  1. … 104 more files in changeset.
Moved test factory methods out of production code

  1. … 19 more files in changeset.
Always use factory method to create ProjectComponentId

  1. … 24 more files in changeset.
Remove handling for case without composite context

The composite context is now always part of the services in a build, so

we no longer need to handle the case where it does not exist.

  1. … 6 more files in changeset.
Changed `LocalComponentArtifactIdentifier` -> `LocalComponentArtifactMetadata`

The 'file' property is no longer exposed in the artifact identifier: this removes

a bunch of casts.

  1. … 18 more files in changeset.
Moved composite-specific DM types into a separate package

  1. … 26 more files in changeset.
Renamed some internal services to reflect a broader role in composite build

- ProjectComponentRegistry -> LocalComponentRegistry

- renamed getProject() -> getComponent()

- ProjectComponentProvider -> LocalComponentProvider

- Extracted register() method into a sub-interface

  1. … 22 more files in changeset.
IdeProjectDependency no longer needs to hold a reference to a `Project` instance #composite-builds

  1. … 3 more files in changeset.
Always use the registered iml artifact to determine module name

This consolidates the work done for IDE support in #composite-builds

with that for regular builds: the consumer project no longer needs

to reach into the dependent project to inspect the state of the

`ideaModel` extension. This information is now pushed from the

dependent project.

    • -5
    • +16
    ./ModuleDependencyBuilderTest.groovy
  1. … 13 more files in changeset.
Use the registered '.iml' artifact for dependent module name #composite-builds

  1. … 10 more files in changeset.
Remove deprecated methods from `ide` project

  1. … 14 more files in changeset.
Detangle Configuration from the IDE model a little

  1. … 12 more files in changeset.
renamed HelperUtil to TestUtil (REVIEW-1626)

  1. … 145 more files in changeset.
Remove @author tags and names from source code.

- Added checkstyle check for @author

- Added not to CONTRIBUTING.md saying that we don't use names in the codebase

  1. … 1213 more files in changeset.