Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Find a better home for `Usage`

  1. … 13 more files in changeset.
Add support for publishing libraries using the `maven-publish` plugin

This commit adds support for API dependencies in the generated pom file when using the `maven-publish` plugin.

It refactors the `Usage` class to make it public, and extensible by users. Then the legacy internal `Usage` class,

which was only used by the publishing plugin, has been updated to use `Usage` as a member, instead of being directly

the usage. This allows us to map configurations to usages more precisely.

- The `compile` scope of the generated pom file consists of the `api` dependencies.

- The `runtime` scope of the generated pom file consists of the old `runtime` dependencies *and* `runtimeElements` dependencies

With this setup, the new publishing plugin is now closer to the reality than the old Maven publishing plugin.

  1. … 23 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.
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:







- Weak references:




- Both reference types:



- 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.
Remove the use of `Optional` in `ProjectDependency#getTargetConfiguration`

+review REVIEW-6242

  1. … 13 more files in changeset.
Deprecate `ModuleDependency#getConfiguration` in favor of `ModuleDependency#getTargetConfiguration`

We want to be able to differentiate between two cases when dependencies on projects are declared:

1. the user didn't choose any specific configuration

2. the user chose a configuration, and it can be the same as the default one

The previous implementation required that `getConfiguration` returns a non-null value, making it impossible to

make a difference between the following cases:

`compile project(':')`


`compile project(path: ':', configuration: 'default')`

The new `getTargetConfiguration` method returns an `Optional<String>`, which will be `absent` if the user

didn't choose anything specific, and `present` if he did.

This allows us to make an explicit configuration selection take precedence over automatic configuration

selection when attributes are defined.

  1. … 15 more files in changeset.
Restored some ivy.xml validation that went missing and added some more.

  1. … 4 more files in changeset.
Ignored broken test temporarily

Reflect transitive flag in generated metadata from Ivy Publish plugin

+review REVIEW-6123

  1. … 5 more files in changeset.
Remove deprecated methods on TestUtil (#672)

In order to use project builder correctly without having

leaking files on windows it is necessary to initialize

the test fixture for NativeServices and clean up

the test directory after building.

AbstractProjectBuilderSpec provides a nice base class

for Groovy tests.

I removed the deprecated methods since using them leads

to files lying around. Migrating all the usages to the "new"

way ensures it is used correctly.

  1. … 96 more files in changeset.
Cleanup test outputs for unit tests in 'ivy' subproject

Revert "Flag a bunch of tests that @LeaksFileHandlers"

Now that the NativeServices initialization is fixed, these tests should

no longer leak file handles on Windows. Let's see.

This reverts commit af9d437b589adbe6688c2c7ec82eb3ba31fa5336.

  1. … 15 more files in changeset.
Flag a bunch of tests that @LeaksFileHandlers

- Now that we're correctly registering the cleanup rules, these

leaks are causing build failures on windows.

  1. … 15 more files in changeset.
Fix broken unit tests

This commit also removes a weird behavior of `ModelPath` that supported dots in names. This is very confusing and caused the discovery

of the 2 other broken tests fixed in this commit.

+review REVIEW-5921

  1. … 2 more files in changeset.
Fixed the location reported when a pom or ivy.xml cannot be parsed so that it points to the origin of the resource, not the cached file.

Also changed the error message to use file path for an origin that is on the file system and a URI for a remote origin. Plus added some test coverage for this.

  1. … 4 more files in changeset.
Use a factory to create `FileCollection` instances in a few more places.

  1. … 19 more files in changeset.
Extracted a base specification which can be used for writing software model plugin unit tests, from various existing unit tests.

  1. … 4 more files in changeset.
Some post merge cleanup and additional test coverage for Ivy publication excludes

+review REVIEW-5755

  1. … 5 more files in changeset.
Move ModelRegistryHelper functionality to Groovy extension module

+review REVIEW-5715

  1. … 19 more files in changeset.
ivy: added support for publishing exclude in descriptors

  1. … 4 more files in changeset.
Cleanup of NativeServices testing changes - Changed use of NativeServicesTestFixture to annotation in many cases - Centralized temp dir creation logic - Enhanced uninitialized NativeServices error message

+review REVIEW-5378

  1. … 41 more files in changeset.
Some cleanup of native services initialization in unit tests

+review REVIEW-5378

  1. … 13 more files in changeset.
Initializing native services for more broken tests

+review REVIEW-5378

  1. … 11 more files in changeset.
Make DirectInstantiator a singleton.

  1. … 88 more files in changeset.
Don't graph-close task container model node when selecting tasks for execution

+review REVIEW-5370

  1. … 37 more files in changeset.
Push the class to rule extractor into the registry, to allow nodes etc. to accept RuleSource classes.

While it bothers me slightly that we are pushing knowledge of a particular type of rule representation into the registry, it saves having to cart some extra stuff around.

+review REVIEW-5353

  1. … 38 more files in changeset.
Collection mutation rule specifies input taking mutation rule for particular model element

+review REVIEW-5353

  1. … 68 more files in changeset.
Revert selective task closing work.

Too much breakage.

+review REVIEW-5350

  1. … 67 more files in changeset.
Wire the model registry into the “task selector”, effectively enabling configure-on-demand for rule based task declarations.

Rather than eagerly “realize” the whole task container and its contents, we now only realize the container itself.

This means that we know of all the tasks that will exist without actually creating them.

If a task (declared by rules) is not needed for a build (i.e. not selected, not depended on) it will not be created.

However, our rule based plugins at this time contain coarse rules that don't allow this feature to be leveraged.

Benefits will only be seen right now for contrived domains.

  1. … 63 more files in changeset.
Deprecate PluginContainer.apply(Class) and PluginContainer.apply(String)

+review REVIEW-5239

  1. … 101 more files in changeset.