ProjectDependencyPublicationResolverTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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

    • -2
    • +2
    ./ProjectDependencyPublicationResolverTest.groovy
  1. … 104 more files in changeset.
Revert "Removed `ExtensionContainerInternal` type. It is not used for anything."

This reverts commit 7cbf09e12965fd07c12d4f2fd2600da87c7a25f2 which

caused problems for plugins using `ProjectInternal`.

    • -3
    • +2
    ./ProjectDependencyPublicationResolverTest.groovy
  1. … 5 more files in changeset.
Removed `ExtensionContainerInternal` type. It is not used for anything.

    • -2
    • +3
    ./ProjectDependencyPublicationResolverTest.groovy
  1. … 5 more files in changeset.
Make DirectInstantiator a singleton.

    • -1
    • +1
    ./ProjectDependencyPublicationResolverTest.groovy
  1. … 89 more files in changeset.
Merge remote-tracking branch 'remotes/origin/release'

    • -4
    • +6
    ./ProjectDependencyPublicationResolverTest.groovy
  1. … 11 more files in changeset.
GRADLE-2837: Ensure that a dependency project is fully evaluated before it is used by a referencing project in publishing

    • -4
    • +6
    ./ProjectDependencyPublicationResolverTest.groovy
  1. … 4 more files in changeset.
Replaced PublicationCoordinates with ModuleVersionIdentifier.

    • -3
    • +5
    ./ProjectDependencyPublicationResolverTest.groovy
  1. … 8 more files in changeset.
Project dependencies map to a single publication of the depended-on project - For single publication, use it - For multiple publications, fail unless all publications have the same coordinates - For no publications, use the project coordinates - Added ProjectDependencyPublicationResolver to do the work of determining the coordinates to use for a project dependency

    • -0
    • +130
    ./ProjectDependencyPublicationResolverTest.groovy
  1. … 20 more files in changeset.