Without this change, removing a file from the task's inputs would not
be reflected in its output as the stale output file for that input
would remain.
Closes gh-46970
Prior to this commit, it wasn't possible to write a test to verify that
a specific ArchRule applied only to a specific SourceSet.
This PR rewrites `ArchitectureCheckTests` to support different sources
and also adds functionality to configure the plugin.
With these changes, all tests now verify not only the
`checkArchitectureMain` task but also `checkArchitectureTest`.
See gh-46822
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Update `EclipseConventions` so that classpath `whenMerged` changes
are applied via `JavaBasePlugin`. Without this change, the `whenMerged`
item is added, but then`EclipsePlugin.configureEclipseClasspath` is
called from a `project.getPlugins().withType(JavaBasePlugin.class, ...`
call. Using a nested call appears to fix the issue, probably because
it now runs after `configureEclipseClasspath`.
Closes gh-46319
Previously, we called getCredentials() to determine whether or not a
repository requires authentication. Unfortunately, the method has the
unwanted side-effect of assigning empty username and password
credentials to a repository that previously did not require
authentication and did not, therefore, have any credentials. These
empty credentials can then cause subsequent failures because
"Username must not be null!".
There's no side-effect-free public API for accessing a repository's
credentials. Instead, we're using some internal API on
AuthenticationSupportedInternal. If this causes problems when
upgrading to a new version of Gradle a different approach will be
required. For example, we could pass in the repositories in two
separate collections: those that require authentication and those
that don't.
Closes gh-45950
Update the reference documentation to provide more details about the
three supported methods of starting Testcontainer containers.
See gh-44187
Signed-off-by: Vanio Begic <vanio.begic123@gmail.com>
Prior to this commit, certain rules, like BeanPostProcessor,
did not work with external classes. This commit ensures that
ArchRules are executed within a context ClassLoader that includes
all classes from the compile classpath.
See gh-45202
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Verification failures are generally failures which verify correctness,
e.g., failures caused by test, compilation, linting, etc.
Non-verification failures are generally failures related to the
build toolchain, e.g., failures caused by dependency resolution, build
configuration, etc.
Develocity attempts to classify failures based on context, but it
doesn't always classify correctly. By default, most failures are
classified as non-verification. By explicitly throwing a
`VerificationException` for verification task failures, the failures
will be appropriately classified.
See gh-45187
See also: https://docs.gradle.com/develocity/failure-classification
Signed-off-by: Eric Haag <ehaag@gradle.com>
Previously, managed dependencies were documented using Gradle's
dependency constraints. This has proven to be non-deterministic for
reasons that are not fully understood. The working theory is that
the constraints that are documented vary depending on the tasks
that the build has run at the point at which the constraints are
being examined and documented.
This commit replaces approach with one that builds a model of a
resolved bom by examining the configured bom extension and the
XML of the Maven boms that it imports. This model is written to
disk from where it can then be consumed as a dependency on other
projects. The existing tasks for documenting the constrained
versions and version properties have been rewritten to use the
resolved bom model instead.
Closes gh-44855
META-INF/spring.factories and META-INF/spring/aot.factories in the
main source set are now checked. The checks verify that:
- Each class listed in the values exists in the source set's output
- The classes are listed alphabetically
- Nested classes are identified using their binary name
Closes gh-44676