javaPlugin.adoc

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Rename user manual asciidoc files to snake_case

This makes the file names match the output HTML file names,

allowing for us to convert the user manual to asciidoc only.

See also #5837

  1. … 170 more files in changeset.
Make incremental compilation the default.

  1. … 24 more files in changeset.
Merge branch 'release'

Make dynamic annotation processors explicit

Calling Processor#getSupportedOptions() is not allowed before

calling Processor#init(). However, we cannot decorate the environment

if the processor is non-incremental, because some processors

expect to be able to cast the environment to its implementation

type.

To fix this, we now require processors to explicitly declare

in their META-INF directory that they may be incremental, but

need to decide at runtime whether they really are. These "dynamic"

processors need to be fine with Gradle wrapping the processing

environment.

  1. … 23 more files in changeset.
Merge branch 'master' into java-plugin-chapter

Update project layout in JVM lang chapters

I have reverted the Java Plugin chapter to using the Asciidoc includsions for

the project layout and updated the Groovy and Scala Plugin chapters to ensure

consistency between them. The latter two chapters still need fully updating to

use definition lists in place of tables.

  1. … 5 more files in changeset.
Merge pull request #5352 from pledbrook/java-chapter-changes

Incorporate feedback into Building Java chapter

  1. … 1 more file in changeset.
Merge remote-tracking branch 'origin/release'

  1. … 4 more files in changeset.
Fix link to java library plugin

This fixes #5739

Add a overview chapter for publishing

This commit extracts the common parts of publishing from the Maven Publish and

Ivy Publish Plugin chapters and restructures them into an overview that should

be easier for newcomers to understand.

One result is slimmer plugin reference chapters. I have also added publishing

sections to the Java and War Plugin chapters detailing the components that they

define.

Finally, I have updated the formatting in the War Plugin chapter so that it's

consistent with other plugin reference chapters.

  1. … 24 more files in changeset.
Incorporate feedback into Building Java chapter

  1. … 1 more file in changeset.
Improve incremental processing docs

- hoist up some of the common limitations

- explain the exact consequences of violating

limitations

- explain the incremental compiler in more detail

so processor authors know they can rely on it

Improve look of property lists in Java Plugin chapter

The names of the properties now appear first on their line, so it's easy to

scan through them for a reader. The new layout is also consistent with the

lists of tasks in this chapter. Finally, the default values are on their own

lines, similar to the "Depends on" for lists of tasks.

One other thing I did was try to verify the read-only status of the properties

as one or two of the entries appeared to be incorrect.

Allow dynamic incremental processor registration

Some annotation processor may not know whether they

can be incremental until runtime. The Google AutoValue

processor for instance has an extension mechanism and

needs to check whether all extensions are incremental

first.

This supersedes the static discovery (based on META-INF)

with a dynamic processor-option based approach. This has

the added benefit that we can easily add more options in

the future.

  1. … 7 more files in changeset.
Update lists of tasks in Java Plugin chapter

I've made the styling of the definition lists consistent with other chapters

and updated some of the content that was looking a little long in the tooth.

I also removed italicisation of the first sentences of definition list

paragraphs because it was overkill and a little hard on the eyes. There was no

real need to emphasise those pieces of text and long sentences of italics can

grate.

Create a new chapter on building Java projects (#4800)

Merge the following changes from @pledbrook:

* Create a new chapter on Java projects

This covers a general overview in the Building Java projects chapter and a

fleshed out example in the Java testing chapter of setting up integration tests

in a Java build.

* Prune the Java Plugin chapter

Much of the content was overlapping with the new Building Java & JVM projects

chapter, so it has now been removed. The chapter is now a pure reference.

* Add plugin reference chapter for Base Plugin

  1. … 20 more files in changeset.
Create a new chapter on building Java projects (#4800)

Merge the following changes from @pledbrook:

* Create a new chapter on Java projects

This covers a general overview in the Building Java projects chapter and a

fleshed out example in the Java testing chapter of setting up integration tests

in a Java build.

* Prune the Java Plugin chapter

Much of the content was overlapping with the new Building Java & JVM projects

chapter, so it has now been removed. The chapter is now a pure reference.

* Add plugin reference chapter for Base Plugin

  1. … 20 more files in changeset.
Improve documentation for incremental annotation processing

Improve documentation for incremental annotation processing

Fix broken links

  1. … 3 more files in changeset.
Make aggregating annotation processors faster

Aggregating processors need to reprocess all classes they are

interested in on any change. Until now this was ensured by passing

all their source files to the compiler for recompilation.

However, the Java compiler can run annotation processing on class

files too. So instead of recompiling the (unchanged) source files

we now tell the compiler which classes to reprocess. This adds a

small new limitation for aggregating processors - their annotations

need to have at least CLASS retention to be visible in the class

files. The benefit is much faster compilation.

  1. … 27 more files in changeset.
Rename isolated annotation processors to "isolating"

To be symmetric with "aggregating".

  1. … 16 more files in changeset.
Improves --tests pattern matching (#4597)

We improve test pattern matching in this PR. From this PR, the test pattern matching

rule are adjusted:

- If a pattern starts with an upper-case letter, it will be used to match simple class name

e.g 'TestClass.testMethod' can match 'TestClass.testMethod' under any package.

- Otherwise, it will be used to match full qualified name.

In both cases, wildcards are supported.

  1. … 12 more files in changeset.
Document incremental annotation processing

  1. … 17 more files in changeset.
Add test engine filter to documentation (#4598)

Add test engine filter to documentation

  1. … 10 more files in changeset.
Merge branch 'master' into working-with-files-docs

  1. … 1 more file in changeset.
Move Java props info from files to Java chapter

  1. … 1 more file in changeset.
Document JUnit 5 in Java Plugin chapter of userguide

This fixes https://github.com/gradle/gradle/issues/4403

Provide documentation of the JUnit 5 support in Gradle 4.6 userguide

  1. … 3 more files in changeset.
Updated userguide and dsl for failFast (and example) (#4394)

  1. … 1 more file in changeset.
Stop test execution after first failure (#4190)

* Rough pass at stopNow() on test failure

* Updated worker TestClassProcessor.stopNow() to throw UnsupportedOperationException

* Updated MaxNParallelTestClassProcessor to keep "raw" processors for stopNow().

Updated other daemon-side TestClassProcessors to keep track if stopNow() is called.

* Added AbstractTestTask.getFailFast()

* Added some unit tests for to TestClassProcessors

* Added unit tests for stopNow()

* Rough pass at JUnitFailFastIntegrationTest

* Refactor fail fast JVM integration test.

Moved common logic/tests from JUnitFailFastIntegrationTest into AbstractJvmFailFastIntegrationSpec.

Added TestNGFailFastIntegrationTest (which extends TestNGFailFastIntegrationTest)

* Working on forkEvery fail fast test

* Converted FailFastTestListener to FailFastTestListenerInternal

* Added BlockingHttpServer.expectMaybeAndBlock()

* TestNG parallel & fail-fast integration test

* Remove unused import

* Remove unused import

* Marked test.failFast as @Input

* Added `failFast` to java_plugin in userguide

* Javadoc & formatting changes

* Updated userguide docs based on review comments

* Moved `failFast` configuration from `AbstractTestTask` to `Test` to avoid `XCTest`

* Updates from review comments

* More updates from review comments

* Reduced Mock() usage in FailFastTestListenerInternalTest

* Backed out changes to XCTestExecuter for fail fast behavior

* Fixed typo in javadoc

* Remove --no-fail-fast `@Option` from `Test`

* Reduce mocking expectations in ForkingTestClassProcessorTest

* Moved @Internal from Test.getFailFast() to AbstractTestTask

* Formatting updates

* Updated ForkingTestClassProcessor to track state more precisely to avoid stop() & stopNow() problem

* Fixed tests (again)

* Better handling of mutual exclusion between ForkingTestClassProcessor stop() and stopNow() sections

* Improved resiliency to indeterminate generated test class execution in fail fast tests

* Optimized imports

* Updated DefaultWorkerProcess.cleanup() to stop the Stoppables before aborting the execHandle

* Changed CyclicBarrierAnyOfRequestHandler.expected back to `private`

* ForkingTestClassProcessor.stoppedNow does not need to be `volatile` as it is now protected by a lock

* Added JUnitPlatformTestClassProcessor.stopNow()

* Removed mention of --no-fail-fast from user guide

* Added info on --fail-fast to release notes

* Fixed use of `testOmitted` in AbstractJvmFailFastIntegrationSpec

* Make MaxNParallelTestClassProcessor drop any processTestClass() invocations after stopNow()

* Protected critical region in ForkingTestClassProcessor.processTestClass() causing race condition with stopNow() in tests

* Debugging cleanup

  1. … 41 more files in changeset.