Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Introduce shorthand notation for strict versions

This commit introduces a modifier (!!) that can be

used in version strings to introduce a strict version.

For example, the following notation:

org:foo:1.0!!

is equivalent to:

version { strictly '1.0' }

And this notation:

org:foo:[1.0,2.0]!!1.5

is equivalent to:

version {

strictly '[1.0, 2.0]'

prefer '1.5'

}

    • -2
    • +46
    ./DependencyStringNotationConverter.java
  1. … 2 more files in changeset.
Introduce shorthand notation for strict versions

This commit introduces a modifier (!!) that can be

used in version strings to introduce a strict version.

For example, the following notation:

org:foo:1.0!!

is equivalent to:

version { strictly '1.0' }

And this notation:

org:foo:[1.0,2.0]!!1.5

is equivalent to:

version {

strictly '[1.0, 2.0]'

prefer '1.5'

}

    • -2
    • +46
    ./DependencyStringNotationConverter.java
  1. … 2 more files in changeset.
Use Nullable instead of Optional annotation to mark nullable map params

We shouldn't use something from org.gradle.api.tasks in the MapNotationConverter anyway.

  1. … 8 more files in changeset.
Replace usages of `FileResolver.resolveFile()` with `FileCollectionFactory.resolving()` or `FileOperations.immutable()`, so that `FileResolver` can be responsible only for converting scalar values to File-ish values.

    • -6
    • +6
    ./DependencyClassPathNotationConverter.java
  1. … 40 more files in changeset.
Replace usages of `FileResolver.resolveFile()` with `FileCollectionFactory.resolving()` or `FileOperations.immutable()`, so that `FileResolver` can be responsible only for converting scalar values to File-ish values.

    • -6
    • +6
    ./DependencyClassPathNotationConverter.java
  1. … 40 more files in changeset.
Replace usages of `FileResolver.resolveFile()` with `FileCollectionFactory.resolving()` or `FileOperations.immutable()`, so that `FileResolver` can be responsible only for converting scalar values to File-ish values.

    • -6
    • +6
    ./DependencyClassPathNotationConverter.java
  1. … 40 more files in changeset.
Replace usages of `FileResolver.resolveFile()` with `FileCollectionFactory.resolving()` or `FileOperations.immutable()`, so that `FileResolver` can be responsible only for converting scalar values to File-ish values.

    • -6
    • +6
    ./DependencyClassPathNotationConverter.java
  1. … 40 more files in changeset.
Apply `Inner class may be 'static'` inspection the whole project

    • -1
    • +1
    ./DependencyClassPathNotationConverter.java
  1. … 41 more files in changeset.
Apply `Explicit type can be replaced with <>` inspection the whole project

    • -2
    • +2
    ./ClientModuleNotationParserFactory.java
    • -1
    • +1
    ./DependencyClassPathNotationConverter.java
    • -2
    • +2
    ./DependencyConstraintNotationParser.java
    • -2
    • +2
    ./DependencyMetadataNotationParser.java
  1. … 905 more files in changeset.
Change 'compilOnly' to the more correct 'implementation'

    • -4
    • +11
    ./DependencyClassPathNotationConverter.java
  1. … 6 more files in changeset.
Change 'compilOnly' to the more correct 'implementation'

    • -4
    • +11
    ./DependencyClassPathNotationConverter.java
  1. … 6 more files in changeset.
Change 'compilOnly' to the more correct 'implementation'

    • -11
    • +7
    ./DependencyClassPathNotationConverter.java
  1. … 5 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -3
    • +3
    ./DependencyClassPathNotationConverter.java
  1. … 902 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -3
    • +3
    ./DependencyClassPathNotationConverter.java
  1. … 902 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -3
    • +3
    ./DependencyClassPathNotationConverter.java
  1. … 890 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -3
    • +3
    ./DependencyClassPathNotationConverter.java
  1. … 897 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -3
    • +3
    ./DependencyClassPathNotationConverter.java
  1. … 902 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -3
    • +3
    ./DependencyClassPathNotationConverter.java
  1. … 902 more files in changeset.
Add missing @Override to all modules

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +1
    ./ClientModuleNotationParserFactory.java
    • -0
    • +1
    ./DependencyClassPathNotationConverter.java
    • -1
    • +2
    ./DependencyConstraintProjectNotationConverter.java
    • -0
    • +1
    ./DependencyFilesNotationConverter.java
    • -1
    • +2
    ./DependencyProjectNotationConverter.java
    • -0
    • +1
    ./DependencyStringNotationConverter.java
  1. … 1000 more files in changeset.
Add missing @Override to all modules

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +1
    ./ClientModuleNotationParserFactory.java
    • -0
    • +1
    ./DependencyClassPathNotationConverter.java
    • -1
    • +2
    ./DependencyConstraintProjectNotationConverter.java
    • -0
    • +1
    ./DependencyFilesNotationConverter.java
    • -1
    • +2
    ./DependencyProjectNotationConverter.java
    • -0
    • +1
    ./DependencyStringNotationConverter.java
  1. … 994 more files in changeset.
Day 7 - Add `kotlin-stdlib` and `kotlin-reflect` to GRADLE_API

    • -1
    • +14
    ./DependencyClassPathNotationConverter.java
  1. … 2 more files in changeset.
Fix for Kotlin dependency rework

    • -5
    • +9
    ./DependencyClassPathNotationConverter.java
  1. … 1 more file in changeset.
Add a converter so that the Kotlin DSL properly handles project constraints

    • -0
    • +16
    ./DependencyConstraintNotationParser.java
Add tests for publishing Java platforms

    • -1
    • +4
    ./DependencyConstraintNotationParser.java
    • -0
    • +44
    ./DependencyConstraintProjectNotationConverter.java
  1. … 12 more files in changeset.
Refine gradleApi() filtering for optional Kotlin DSL

by relying on classpath registry instead of hardcoded filtering

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -16
    • +4
    ./DependencyClassPathNotationConverter.java
  1. … 3 more files in changeset.
Change `NotationParserBuilder` to allow construction of a `NotationParser` that accepts something other than `Object` as its notation type.

    • -6
    • +8
    ./ModuleIdentifierNotationConverter.java
  1. … 15 more files in changeset.
Validate component identifier parsing

    • -5
    • +7
    ./ComponentIdentifierParserFactory.java
    • -16
    • +1
    ./ModuleIdentifierNotationConverter.java
    • -0
    • +42
    ./ModuleNotationValidation.java
  1. … 2 more files in changeset.
Add support for backlinks in dependency graph

A module may declare the platform(s) it belongs to. If it does so, then we implicitly add an outgoing edge

to the platform, allowing us to resolve all dependencies belonging to the same platform consistently. This

allow us to implement _module alignment_, by telling that 2 modules belong to the same platform. In practice,

there are 2 possible cases:

1. the "platform" a module belongs to exists, in which case, an outgoing edge is added to a "published module",

and this module is expected to have constraints onto the other modules of the same platform.

2. the "platform" a module belongs to doesn't exist, for example because the publisher didn't define

such a thing. In that case, a platform can be constructed "adhoc", and we will try to use modules of the same

version as the platform whenever possible.

The second case is significantly more expensive as it forces us to create "virtual" dependencies, and for each

of them we need to check if the target modules exist.

    • -0
    • +74
    ./ComponentIdentifierParserFactory.java
  1. … 18 more files in changeset.
Cache generated file collections

File collections like gradleApi and gradleTestKit

should only be created once, not every time they

are traversed. This saves some time for projects

that make heavy use of these methods, e.g. our

own large buildSrc project.

    • -1
    • +5
    ./DependencyClassPathNotationConverter.java
Intern strings when reading module metadata from cache

Dependency resolution of large dependency graphs involves a significant

number of comparisons of strings(group, artifact, version, ...). Most of

those come from the module metadata cache, and even if we use hashmaps,

we still need to perform `equals` comparisons on strings, when in most

of the cases they should be identical. This commit takes advantage of

knowing that to add a cost when we read module metadata (interning), but

realizing that the debt is paid when comparing strings during resolution.

The interner is build scoped (in order to avoid memory leaks), thread-safe,

and shared with the dependency notation converter, so that module selectors

created from strings found in the build scripts are using the same strings

as the ones from the module metadata cache.

Ideally, we should also do this for the strings used during parsing.

    • -2
    • +5
    ./ClientModuleNotationParserFactory.java
    • -2
    • +3
    ./DependencyConstraintNotationParser.java
    • -2
    • +3
    ./DependencyMetadataNotationParser.java
    • -2
    • +5
    ./DependencyStringNotationConverter.java
  1. … 13 more files in changeset.