artifacts

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Renamed src/main/groovy to src/main/java in core

    • -70
    • +0
    ./CachingDependencyResolveContext.java
    • -116
    • +0
    ./DefaultArtifactRepositoryContainer.java
    • -35
    • +0
    ./DependencyManagementServices.java
    • -29
    • +0
    ./DependencyResolutionServices.java
    • -29
    • +0
    ./DependencyResolveDetailsInternal.java
    • -34
    • +0
    ./DependencySubstitutionInternal.java
    • -49
    • +0
    ./ExcludeRuleNotationConverter.java
  1. … 2531 more files in changeset.
Replace usage of `String#format` with good old string concatenation

The rationale behind this change is that while `String#format` is usually admitted as good for readability (this is arguable),

in practice it is very bad for performance. Since Java 6, the JVM (the JIT, to be correct) does a pretty good job at optimizing

string concatenation. However, it is only capable to do so if we're using "dirty" string concatenations (using `+`), or `StringBuilder`.

However, usage of `StringBuilder` is not recommended either for 2 reasons:

1. it significantly decreases code readability

2. in Java 9, String concatenation is even more optimized thanks to `invokedynamic`, and code using `StringBuilder` will *not* benefit

from this optimization.

There are sill leftover `String#format` calls in the code, in the following cases:

- the call is used to generate an exception message. That's 90% of the remaining calls.

- the call is obviously a debug message, often used in `toString` (because as we all know, `toString` should only be used for debugging)

- the format includes specific number formatting patterns

- I missed it

    • -1
    • +1
    ./DefaultArtifactRepositoryContainer.java
    • -1
    • +1
    ./publish/AbstractPublishArtifact.java
  1. … 224 more files in changeset.
Added relevant setters to `DependencyArtifact` interface to make it clear that the properties of this type are mutable, and to allow them to be mutated from languages other than Groovy.

    • -0
    • +25
    ./dependencies/DefaultDependencyArtifact.java
  1. … 1 more file in changeset.
Improve property and method lookup from some configuration closures, by short-circuiting the inefficient lookup in `Closure` and reusing the lookup in `ConfigureDelegate` instead.

Currently this improvement is applied only in a few places in the DSL, in particular when configuring any named container (but not its elements). A later change will roll this out more widely.

This change also removed duplicate property and method lookup on the owner object for these closures, improves error reporting on missing property or method so that the actual target of the configure closure is reported, and also cleans up the closure parameter and closure.delegate objects that are visible to the closure body so that they are always the target object.

    • -1
    • +1
    ./DefaultArtifactRepositoryContainer.java
  1. … 13 more files in changeset.
Convert ModuleFactoryDelegate to java

    • -0
    • +93
    ./dsl/dependencies/ModuleFactoryDelegate.java
Added `ProjectFinder.findProject()` to avoid using unnecessary exceptions

    • -1
    • +10
    ./dsl/dependencies/ProjectFinder.java
    • -0
    • +38
    ./dsl/dependencies/UnknownProjectFinder.java
  1. … 5 more files in changeset.
Switch to use of fat Gradle API

+review REVIEW-5867

    • -1
    • +1
    ./dsl/dependencies/DependencyFactory.java
  1. … 12 more files in changeset.
Changed `dependencies.gradleTestKit()` to use the runtime generated shaded jar rather than the build-time generated shaded jar.

Also removed the `fatGradleTestKit()` method as it is no longer used.

    • -1
    • +1
    ./dsl/dependencies/DependencyFactory.java
  1. … 6 more files in changeset.
Revert to old behavior of gradleApi() and gradleTestKit()

The new behavior is still reachable through internal APIs but not exposed to the end user.

+review REVIEW-5867

    • -1
    • +1
    ./dsl/dependencies/DependencyFactory.java
  1. … 10 more files in changeset.
Switch to exclusive use of fat/relocated Gradle API/TestKit

Java Gradle dev plugin requires the use of the fully-resolve Gradle dependencies.

+review REVIEW-5867

    • -1
    • +1
    ./dsl/dependencies/DependencyFactory.java
  1. … 6 more files in changeset.
Revert usage of fat/relocated Gradle API/TestKit

Requires additional fixing of existing test cases that are now impacted.

+review REVIEW-5867

    • -1
    • +1
    ./dsl/dependencies/DependencyFactory.java
  1. … 5 more files in changeset.
Switch over to plain gradleApi() and gradleTestKit() dependencies

+review REVIEW-5867

    • -1
    • +1
    ./dsl/dependencies/DependencyFactory.java
  1. … 5 more files in changeset.
Usage of cached, fat TestKit JAR requires explicit dependency declaration

- The use of fatGradleApi() and fatGradleTestKit() is currently not multi-process safe.

- Decouple use to allow an easier migration path until the implementation provides support for progress logging and concurrent/multi-process access.

- Fixes cross-version tests that fork concurrent JVMs to run GradleRunner test cases.

+review REVIEW-5867

    • -1
    • +1
    ./dsl/dependencies/DependencyFactory.java
  1. … 6 more files in changeset.
Use a fat JAR when resolving Gradle API dependency

- Generated in Gradle user home directory and not shipped with Gradle distribution

- Intital use needs to create fat JAR once

- Classes from external dependencies are relocated within the fat JAR

- For easier migration only use fat JAR when user declares fatGradleApi() dependency

+review REVIEW-5867

    • -1
    • +1
    ./dsl/dependencies/DependencyFactory.java
  1. … 14 more files in changeset.
Use a factory to create `FileCollection` instances in a few more places.

  1. … 19 more files in changeset.
Renamed TaskDependencyContainer.resolve() to visitDependencies().

    • -1
    • +2
    ./dependencies/DefaultProjectDependency.java
  1. … 24 more files in changeset.
Resource transport credentials refactoring. - Authentication objects are now passed thru to ResourceConnectionFactory - Connectors now use credentials on Authentication objects for configuration - Removed some usages of duplicate PasswordCredentials class in resources project

+review REVIEW-5569

    • -0
    • +52
    ./repositories/DefaultPasswordCredentials.java
  1. … 26 more files in changeset.
Moved ResolveContext from 'core' to 'dependency-management'

  1. … 7 more files in changeset.
Based on Daz's feedback renamed testKit() method to gradleTestKit() to be more specific.

+review REVIEW-5533

    • -1
    • +1
    ./dsl/dependencies/DependencyFactory.java
  1. … 7 more files in changeset.
Expose test-kit dependency via DependencyHandler API. TODO: Need to restrict gradleApi dependency to avoid loading test-kit classes by default.

+review REVIEW-5533

    • -2
    • +2
    ./dsl/dependencies/DependencyFactory.java
  1. … 5 more files in changeset.
Move ResolveContext to internal package

+review REVIEW-5505

    • -0
    • +34
    ./ResolveContext.java
  1. … 12 more files in changeset.
Don’t hard-code component selector subtypes in DependencySubstitutionResolver

    • -24
    • +0
    ./ModuleDependencySubstitutionInternal.java
    • -22
    • +0
    ./ProjectDependencySubstitutionInternal.java
  1. … 18 more files in changeset.
Support watching for local changes to dependencies, where the dependency is on a file tree.

+review REVIEW-5481

    • -4
    • +11
    ./dependencies/DefaultSelfResolvingDependency.java
  1. … 6 more files in changeset.
Don’t resolve ProjectDependency as SelfResolvingDependency

    • -3
    • +1
    ./dependencies/DefaultProjectDependency.java
  1. … 2 more files in changeset.
Don’t include configuration itself as task dependency for project dependency

    • -1
    • +3
    ./dependencies/DefaultProjectDependency.java
  1. … 2 more files in changeset.
Use covariant return types instead of type param for specializing DependencySubstitution subtypes.

    • -2
    • +1
    ./ModuleDependencySubstitutionInternal.java
    • -2
    • +1
    ./ProjectDependencySubstitutionInternal.java
  1. … 12 more files in changeset.
Added back check for StartParameter.isBuildDependencies() in ProjectDependency.resolve()

    • -21
    • +29
    ./dependencies/DefaultProjectDependency.java
  1. … 5 more files in changeset.
Revert "Prepare: Drop SelfResolvingDependency from ProjectDependency"

This reverts commit a2a2a47aa987233191caeed7f488f46972946527.

Conflicts:

subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependency.java

subprojects/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationTest.java

    • -2
    • +34
    ./dependencies/DefaultProjectDependency.java
  1. … 4 more files in changeset.
Use StartParameter.buildProjectDependencies directly instead of via DefaultProjectDependency field

* Previously, when ‘—no-build’ was on, we could avoid having to even

evaluate a project dependency’s project. Now it’s not possible, as we

need the project to be evaluated in order to run substitution rules.

* Still, the test was showing a real problem: we were still running the

tasks of the dependent project even with ‘--no-build’ turned on,

because we simply ignored

DefaultProjectDependency.buildProjectDependencies.

The fix includes updating the test, so that we don’t expect the

dependency project not to be evaluated anymore.

It also became possible to remove

DefaultProjectDependency.buildProjectDependencies, and instead pass

StartParameter.buildProjectDependencies directly to

DefaultDependencyResolver.

This way we can simply not collect any project dependency information

during dependency resolution, and thus

DefaultConfiguration.resolveNow() won’t add any task dependencies.

    • -10
    • +5
    ./dependencies/DefaultProjectDependency.java
  1. … 8 more files in changeset.
Removed deprecation of `ResolutionStrategy.eachDependency`

- Attempts to fix test breakages

- Still need to assess whether to announce new DSL in Gradle 2.4

    • -1
    • +0
    ./DependencyResolveDetailsInternal.java
  1. … 4 more files in changeset.