Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Make java libraries publishable on Ivy using Gradle metadata

This commit completes Gradle metadata publishing on Ivy repositories. It adds the necessary support, and

converts several tests to the wrapping `javaLibrary` test fixture.

  1. … 27 more files in changeset.
Publish Gradle metadata on Ivy repositories

This commit adds support for publishing Gradle metadata on Ivy repositories. Existing tests haven't been

adapted yet.

  1. … 9 more files in changeset.
Add `status` to Gradle module metadata

This commit adds attributes to top level component in Gradle metadata. Attributes are written to Gradle metadata files,

and when read, some attributes can be mapped to existing, legacy, properties of component metadata. This is the case

for the "status" property, which is now mapped to a component attribute when serializing, and mapped back to the "status"

property when reading.

This commit also introduces a test that makes sure that the status is actually read from the Gradle metadata file, by

totally ignoring the Ivy descriptor.

  1. … 18 more files in changeset.
Remove `FOR_COMPILE` and `FOR_RUNTIME` from Usage

The constants had been replaced internally, except for publication. This commit removes them in favor of

using the more specific `JAVA_API` and `JAVA_RUNTIME` constants (in their string forms, making it possible

later to match by value, avoiding classloading issues).

  1. … 8 more files in changeset.
Merged the file resource implementation for the public `Resource` API into the file resource implementation for `ExternalResource` used by dependency resolution and publishing. This is a small step towards merging and reusing all the various resource implementations.

  1. … 30 more files in changeset.
Moved `FileResourceConnector` from 'dependencyManagement' to 'resources' project.

  1. … 10 more files in changeset.
Added `FileResourceRepository` as a global service for creating various file backed `ExternalResource` implementations. Use this in various places instead of creating these implementations directly.

  1. … 41 more files in changeset.
Replaced `ExternalResourceRepository.getResourceMetaData()` with `ExternalResource.getMetaData()`.

Also changed the file backed implementation of `ExternalResource` to use `FileSystem.stat()` to calculate the file meta-data, rather than using the `File` API.

  1. … 50 more files in changeset.
Detangle ivy module descriptor parser

This commit removes the Ivy module descriptor parser as a service, because it unfortunately introduced

a lot of tangling between projects, making it necessary to introduce `project(':ivy')` as a dependency

to almost all projects.

This commit removes the parser as a service and creates it on demand. It should not have a big impact

on performance since there should be only one instance in global scope, through `IvyResolver`.

  1. … 19 more files in changeset.
Cache module version identifiers

In a similar way to module identifiers, use the module identifier factory to cache the module version identifiers.

It allows faster comparisons as we will hit `a==b` much more often and don't have to go the `equals` route. There

are still places where the factory is not used, but it doesn't seem to have a huge impact on performance.

  1. … 49 more files in changeset.
Use the module identifier factory during ivy parsing

  1. … 23 more files in changeset.
Revert "Revert "Merge branch 'cc-java-library-plugin'""

This reverts commit c6cd884e1a8889fb25d26dfcfdfa79d896835e11.

  1. … 76 more files in changeset.
Revert "Merge branch 'cc-java-library-plugin'"

This reverts commit 0d442a55b445f537efbce65267ce9418fce2e7a8, reversing

changes made to 04647ab69fc8d19186cd2a78124ea74b8a89cc0f.

  1. … 76 more files in changeset.
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.