Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Move Java sources from src/main/groovy to src/main/java

There are no Groovy sources left, so there's no need to keep these files in src/main/groovy. We can also save build time by only invoking a single compiler instead of two for these projects.

  1. … 373 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. … 224 more files in changeset.
Add 'compileClasspath' configuration to all source sets

- Creates another configuration, 'compileClasspath', for all source sets

- This configuration extends from 'compileOnly'

- Source set's compileClasspath is set to 'compileClasspath' configuration

+review REVIEW-5807

  1. … 17 more files in changeset.
Add 'compileOnly' configuration for each source set.

This commit creates a new 'compileOnly' configuration for each declared source set. Dependencies added to this source set are used during compilation only. They are not included on the runtime classpath, are not inherited by test classpath, are not included in 'deployable' artifacts such as WARs, EARs or application distributions, are not exported to consuming projects, and are not included in published metadata.

+review REVIEW-5807

  1. … 22 more files in changeset.
Introduced a factory to create `SourceDirectorySet` instances, to avoid exposing the dependencies of `DefaultSourceDirectorySet` to all the places that need to create a `SourceDirectorySet`.

  1. … 35 more files in changeset.
Added a fallback renderer to use for any JVM binary spec without a more specific renderer.

This happens to include JUnit test suite binaries.

  1. … 3 more files in changeset.
Introduce `testing-base` module

This commit introduces a new `testing-base` module aimed at detangling the `plugins` module, by extracting 2 things:

* classes that are used independently of a testing framework or the JVM (`TestDescriptor`, ...)

* classes which are specific to JVM testing (`Test`, `TestReport`, `TestWorker`, ...)

The first category are extracted in the `testing-base` module. The second category have been migrated to the `testing-jvm` module, which now includes TestNG specific classes too.

* The `testing-jvm` module no longer depends on `plugins`, but on `testing-base` instead.

* The `plugins` module now depends on `testing-jvm` (so we have effectively inverted the dependency).

It's worth noting that while main classes have been shuffled around, test classes have not been moved, and some quality checks had to be disabled. For example, strict compilation and classcycle cannot be used anymore in the `testing-jvm` module without introducing breaking changes.

Two classes (`JUnitOptions` and `TestNGOptions`) have been migrated from Groovy to Java.

At this point, building Gradle is broken. Subsequent commits will fix that.

Story: gradle/langos#103

Item: refactor-plugins

    • -53
    • +0
    ./testing/AbstractTestDescriptor.java
    • -64
    • +0
    ./testing/DecoratingTestDescriptor.java
    • -41
    • +0
    ./testing/DefaultJUnitXmlReport.java
    • -33
    • +0
    ./testing/DefaultTestClassDescriptor.java
    • -34
    • +0
    ./testing/DefaultTestClassRunInfo.java
    • -41
    • +0
    ./testing/DefaultTestDescriptor.java
    • -28
    • +0
    ./testing/DefaultTestMethodDescriptor.java
    • -68
    • +0
    ./testing/DefaultTestOutputEvent.java
    • -34
    • +0
    ./testing/DefaultTestSuiteDescriptor.java
    • -46
    • +0
    ./testing/DefaultTestTaskReports.java
    • -42
    • +0
    ./testing/NoMatchingTestsReporter.java
    • -67
    • +0
    ./testing/SuiteTestClassProcessor.java
    • -41
    • +0
    ./testing/TestClassLoaderFactory.java
  1. … 264 more files in changeset.
Modified exception handling when TestNG does not support preserving order or grouping by instances. The NoSuchMethodException is wrapped by a GradleException with a meaningful message.

Fixed error handling for explicit setting of groupByInstances option when underlying TestNG does not support it.

Fix typo

Incorporated feedback.

    • -4
    • +12
    ./testing/testng/TestNGTestClassProcessor.java
  1. … 5 more files in changeset.
Merged `BinaryNamingSchemeBuilder` into `BinaryNamingScheme`.

  1. … 13 more files in changeset.
Moved a bunch of classes from 'core' to 'plugins' project.

    • -1
    • +0
    ./testing/processors/CaptureTestOutputTestResultProcessor.java
    • -0
    • +93
    ./testing/processors/DefaultStandardOutputRedirector.java
    • -0
    • +26
    ./testing/processors/StandardOutputRedirector.java
  1. … 5 more files in changeset.
Changed JavaBasePlugin to create compile and process resources tasks using the legacy types rather than the software model type. This allows the software types to be created later (ie as rules require them).

  1. … 3 more files in changeset.
Moved some logic from DefaultClassDirectoryBinarySpec to DefaultSourceSet.

  1. … 6 more files in changeset.
Renamed FileCollectionContainer.resolve() to visitContents()

  1. … 25 more files in changeset.
Minor tweaks.

  1. … 1 more file in changeset.
Some fixes to enable test filtering for JUnit versions < 4.6. Added some test coverage.

    • -6
    • +8
    ./testing/junit/JUnitTestEventAdapter.java
    • -20
    • +0
    ./testing/junit/JUnitTestFramework.java
  1. … 8 more files in changeset.
Improved test filtering for Junit classes that use a Runner that is not also Filterable.

    • -9
    • +47
    ./testing/junit/JUnitTestClassExecuter.java
  1. … 3 more files in changeset.
fix handling of tasks without declared test classes available

+review REVIEW-5563

    • -0
    • +11
    ./testing/filter/DefaultTestFilter.java
  1. … 6 more files in changeset.
Moved Throwable Serializer from plugins to messaging projects.

    • -12
    • +2
    ./testing/worker/TestEventSerializer.java
  1. … 3 more files in changeset.
Changed TestEventSerializer so that it provides a Serializer rather than a StatefulSerializer.

    • -1
    • +1
    ./testing/worker/ForkingTestClassProcessor.java
    • -30
    • +3
    ./testing/worker/TestEventSerializer.java
  1. … 11 more files in changeset.
Adding build session scope to PluginServiceRegistry

+review REVIEW-5510

  1. … 34 more files in changeset.
handle test not available anymore

    • -3
    • +3
    ./testing/NoMatchingTestsReporter.java
  1. … 12 more files in changeset.
allow setting class and method name explicit in TestFilter

    • -1
    • +11
    ./testing/filter/DefaultTestFilter.java
  1. … 3 more files in changeset.
Revert "update spec with implementation for test execution via tooling-api"

    • -37
    • +5
    ./testing/filter/DefaultTestFilter.java
    • -29
    • +2
    ./testing/filter/TestSelectionMatcher.java
    • -2
    • +2
    ./testing/junit/JUnitTestFramework.java
  1. … 24 more files in changeset.
Remove unused method

    • -4
    • +0
    ./testing/processors/TestMainAction.java
Don't make assumptions about the TestDescriptor implementations when forwarding test progress events to the build client.

    • -0
    • +8
    ./testing/DecoratingTestDescriptor.java
    • -0
    • +7
    ./testing/processors/TestMainAction.java
  1. … 3 more files in changeset.
Consistently treat operation ids as Object types

    • -6
    • +6
    ./testing/processors/TestMainAction.java
  1. … 8 more files in changeset.
Various build operation ids should be created on the Gradle side

+review REVIEW-5487

  1. … 9 more files in changeset.