Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Prefer composition over inheritance in PerformanceTest hierarchy (#10262)

### Context

Previously, we had a bad `PerformanceTest` hierarchy:

- PerformanceTest

- ReportGenerationPerformanceTest

- BuildScanPerformanceTest

- DistributedPerformanceTest

- RerunDistributedPerformanceTest

This PR does a refactoring - extracts a `PerformanceTestReporter`/`DistributedPerformanceTestReporter` out of the `PerformanceTest` hierarchy, because https://github.com/gradle/gradle-private/issues/2192 wants a report, too.

The hierarchy after the refactoring:

- PerformanceTest

- DistributedPerformanceTest

- PerformanceTestReporter

So we can make things easier.

  1. … 10 more files in changeset.
Allow running build types for multiple subprojects at once

So we can invoke e.g. `baseServices:quickTest cli:quickTest`.

Allow running build types for multiple subprojects at once

So we can invoke e.g. `baseServices:quickTest cli:quickTest`.

Add missing type information to `PerformanceTestPlugin`

For compatibility with Kotlin 1.3.41.

Enable incremental compilation for Groovy (#9803)

In https://github.com/gradle/gradle/pull/9616 we did preliminary support for Groovy incremental compilation. This PR enables Groovy incremental compilation for Gradle build.

  1. … 1 more file in changeset.
Dogfood native test fixtures

This commit replaces our custom test fixtures with the native "Java test fixtures".

The `TestFixturesPlugin` of our build has been simplified to leverage the native

test fixtures capabilities. Some noticeable changes:

- the `testFixtures` extension has been replaced with regular dependency declaration

- dependencies on test fixtures are now declared using the `testFixtures` keyword

- test fixtures properly declare an API and an implementation, meaning that the

implementation dependencies of test fixtures no longer leak into the compile

classpath of consumers (in particular tests)

  1. … 84 more files in changeset.
Rework ClasspathManifest task so its state doesn't hold Project references

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

    • -24
    • +50
    ./kotlin/org/gradle/build/ClasspathManifest.kt
  1. … 2 more files in changeset.
Change all subprojects to use 'implementation' dependencies

This includes:

- All projects now explicitly declare all dependencies to other

subprojects. This makes issues more visible, guards for accidental

addition of new dependencies, and leaks much less transitive

dependencies on the compile classpathes.

- All usages of 'runtime' to declare dependencies have been replaced

with 'runtimeOnly'

- All projects are now `java-library` (and declare this explicitly)

- Most remaining Groovy scripts are translated to Kotlin

- The old 'compile' and 'runtime' configurations are not

configured/created anymore for the 'testFixture' and 'integTest'

source sets.

- Some obsolete dependencies (see previous commits) are removed

- 'api' is used scarcely on purpose as the current project structure is

not well designed for this. The projects contain code for several

concerns of the build tool and thus putting complete projects on the

API of others exposes too much. They should be split up along

functional concerns first.

    • -6
    • +6
    ./kotlin/org/gradle/plugins/publish/GeneratePom.kt
  1. … 110 more files in changeset.
Add PORTAL_PLUGINS module type for independently published modules

These require the distribution platform dependency to be handled

differently.

  1. … 1 more file in changeset.
Make more subprojects use Java 8 and remove redundant module types (#9447)

  1. … 28 more files in changeset.
Revert "Use the `StackWalker` API in order to avoid creation of an exception"

This reverts commit 732111e1f549925530afb8993546cd4bb31f2d7a.

We have a weird setup where we need to execute Gradle on JDK 8, so we can't

simply have scripts that depend on Java 9 APIs.

    • -10
    • +5
    ./kotlin/gradlebuild/security.gradle.kts
Use the `StackWalker` API in order to avoid creation of an exception

    • -5
    • +10
    ./kotlin/gradlebuild/security.gradle.kts
Only check each repository once

    • -5
    • +13
    ./kotlin/gradlebuild/security.gradle.kts
Rerun distributed performance test in RERUNNER step (#8801)

After the improvement of automatically rerunning and tagging, we want to manage performance test in the same way:

- Only run each performance test scenario once.

- If it fails, `GRADLE_RERUNNER` will kick in and rerun the failed scenario. The good thing is that it might be scheduled to another build agent, which mitigates the effect of bad agent.

This PR does:

- Remove all `Retry` from performance tests.

- Add `GRADLE_RERUNNER` to performance tests and refactor some code.

- Add tests for `PerformanceTest`.

- Since `GRADLE_RERUNNER` depends on reading of test binary result, write binary test result file in `RerunableDistributedPerformanceTest`.

  1. … 23 more files in changeset.
Improve reporting of repository declaration

    • -10
    • +42
    ./kotlin/gradlebuild/security.gradle.kts
Fix formatting

    • -1
    • +1
    ./kotlin/gradlebuild/security.gradle.kts
Also check publishing repositories

    • -8
    • +15
    ./kotlin/gradlebuild/security.gradle.kts
Make sure we don't accidentally use http repositories

    • -0
    • +48
    ./kotlin/gradlebuild/security.gradle.kts
  1. … 1 more file in changeset.
Revert "Revert "Take advantage of type-safe accessors in precompiled script plugins""

This reverts commit cbe1b9ed3f28e6fb39feaba56e8140f490dc5a6b.

  1. … 4 more files in changeset.
Revert "Take advantage of type-safe accessors in precompiled script plugins"

  1. … 4 more files in changeset.
Polish `api-parameter-names-index.gradle.kts`

Remove unnecessary backticks

Update tagging plugin to 0.56

  1. … 1 more file in changeset.
Update tagging plugin to 0.57

  1. … 1 more file in changeset.
Improve tagging process

Update tagging plugin and fix incorrect parameter.

  1. … 3 more files in changeset.
Improve tagging process

Update tagging plugin and fix incorrect parameter.

  1. … 3 more files in changeset.
Add an opt-out to automatic target jvm setting

Builds like Gradle have "incorrect" module setups: some modules

built for Java 6 have dependencies on Java 8 modules. This, in

general, shouldn't be allowed. However in Gradle it's "fine"

because we know that when we run on Java 6, the classes which

actually need Java 8 features or dependencies are not in use.

  1. … 6 more files in changeset.
Refine GRADLE_RERUNNER (#8522)

This is the followup of https://github.com/gradle/gradle/pull/8470 : there're two issues unresolved:

- `GRADLE_RERUNNER` is configured to `Gradleception`/`compileAll`/`sanityCheck`, etc. , which makes no sense.

- We want to skip `GRADLE_RERUNNER` if there're too many failures.

This PR does:

- Extract another function `applyTestDefaults` in addition to `applyDefaults`. Functional test build and smoke test build apply `applyTestDefaults`.

- Slightly refactor `applyDefaults` function.

- Add unit tests for `applyTestDefaults`/`applyDefaults`.

- Switch to JUnit 5 for `.teamcity` project.

- Ignore the rerun if test failures are > 10.

  1. … 6 more files in changeset.
Fix cache-hit in flakiness detection performance test (#8482)

We don't want build cache hit in performance flakiness detection, however, previously the coordinator build resolves "flakiness-detection-commit" baseline to real commit id "5.3-commit-237a600", resulting in unexpected cache hit.

This PR fixes it by:

- On coordinator's side, pass "flakiness-detection-commit" as it is to worker build.

- On worker's side, worker build resolves "flakiness-detection-commit" to real commit version - this disables build cache.

Since `DetermineBaselines` is becoming more and more complex, this PR also adds a unit test for `DetermineBaselines` class.

  1. … 3 more files in changeset.
Add a build step which reruns previous failed test classes (#8470)

This closes https://github.com/gradle/gradle-private/issues/1774

We've been bitten by flaky tests for a long time. This PR adds an extra build step which reruns failed test classes again.

  1. … 3 more files in changeset.