component

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

    • -69
    • +0
    ./DefaultComponentTypeRegistry.java
    • -28
    • +0
    ./DefaultSoftwareComponentContainer.java
  1. … 2537 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. … 226 more files in changeset.
Use a service rather than project convention object to pass the 'main' component between the Java plugin and the dependency tasks and the buildSrc stuff.

    • -0
    • +32
    ./ComponentRegistry.java
  1. … 6 more files in changeset.
Moved class to 'org.gradle.api.internal.component' to live with some other component related stuff.

    • -0
    • +34
    ./BuildableJavaComponent.java
  1. … 6 more files in changeset.
Moved JavadocArtifact from language-jvm -> language-java

  1. … 10 more files in changeset.
Allow domain plugins to register domain types for use in dependency management

- Core ComponentTypeRegistry allows registration of components and artifact types (internal)

- 'language-jvm' plugins register Jvm model types via PluginServiceRegistry

    • -0
    • +25
    ./ComponentTypeRegistration.java
    • -0
    • +25
    ./ComponentTypeRegistry.java
    • -0
    • +69
    ./DefaultComponentTypeRegistry.java
  1. … 7 more files in changeset.
Moved ArtifactType to be an internal API in 'core'

  1. … 31 more files in changeset.
Don't assume that all dependencies for a Usage are "runtime" in Ivy - Added IvyDependency api and impl which wraps a ModuleDependency and conf mapping string - Only currently used by components: user configuration of dependencies is not supported.

  1. … 16 more files in changeset.
Map Ivy configurations for component from details of component, rather than wiring logic in IvyPublication - Added SoftwareComponent.getUsages() which returns a set of named Usage - Each usage has a set of artifacts and dependencies - Dependencies are not yet mapped properly into ivy - Mapping of usage into Maven is very naive

  1. … 8 more files in changeset.
JavaLibrary no longer includes all artifacts from the "runtime" configuration - artifacts for component are explicitly defined - improved integ tests for multi-project publications

  1. … 7 more files in changeset.
First cut of "Software Component" support: - SoftwareComponent represents something that is built by a project - Project has a container of SoftwareComponent instances - Java plugin adds a JavaLibrary component to the set of software components - SoftwareComponents are not currently used anywhere

    • -0
    • +28
    ./DefaultSoftwareComponentContainer.java
    • -0
    • +26
    ./SoftwareComponentInternal.java
  1. … 7 more files in changeset.