taskfactory

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

    • -483
    • +0
    ./AnnotationProcessingTaskFactory.java
    • -51
    • +0
    ./DependencyAutoWireTaskFactory.java
    • -57
    • +0
    ./InputDirectoryPropertyAnnotationHandler.java
    • -50
    • +0
    ./InputFilePropertyAnnotationHandler.java
    • -42
    • +0
    ./InputFilesPropertyAnnotationHandler.java
    • -36
    • +0
    ./InputPropertyAnnotationHandler.java
    • -47
    • +0
    ./NestedBeanPropertyAnnotationHandler.java
    • -85
    • +0
    ./OutputDirectoryPropertyAnnotationHandler.java
    • -84
    • +0
    ./OutputFilePropertyAnnotationHandler.java
  1. … 2531 more files in changeset.
Include the declared type of a task in missing property error messages for tasks.

  1. … 3 more files in changeset.
Moved `canonicalize()` method from `GFileUtils` to `FileUtils`.

GFileUtils requires Ant and its dependencies. Moving the method to a better home breaks this dependency for clients of the method.

    • -1
    • +2
    ./OutputDirectoryPropertyAnnotationHandler.java
    • -1
    • +2
    ./OutputFilePropertyAnnotationHandler.java
  1. … 23 more files in changeset.
GRADLE-3414 JavaBean spec compliant task input property names parsing

Let's start with how Gradle behave before this commit.

Given the following build script:

```

class MyTask extends DefaultTask {

private String flags

@Input

public String getCFlags() {

flags

}

public void setCFlags(String flags) {

this.flags = flags

}

}

task('something', type: MyTask) {}

```

A simple task with an `@Input` property declared using a getter and a

corresponding setter.

Running `gradle something` rightly shows an error message about the

missing non-optional input:

```

> No value has been specified for property 'cFlags'.

```

So, let's do what Gradle says:

```

task('something', type: MyTask) {

cFlags = "anything"

}

```

But then `gradle something` shows the following error:

```

> No such property: cFlags for class: MyTask_Decorated

Possible solutions: CFlags, class

```

According to the JavaBean spec, the property name should be `CFlags`,

not `cFlags`. Groovy respect the spec, we have a mismatch.

The issue is the same with a bunch of the JavaBeans spec corner cases

like e.g. `getURL()` or `getcCompiler()`. It boils down to using

`java.beans.Introspector.decapitalize()` instead of

`o.a.commons.lang.StringUtils.decapitalize()`.

We fixed the same issue in the software model in 2.11.

All in all, this commit fix the validation error messages. It may break

builds that use `task.getInputs().getProperties().get("...")` and rely

on wrong property names.

+review REVIEW-5878

    • -2
    • +2
    ./AnnotationProcessingTaskFactory.java
  1. … 2 more files in changeset.
Ignore bridge methods in task annotationprocessing

Getters in tasks that result in additional bridge methods have been handled twice by the AnnotationProcessingTaskFactory

This could ultimately result in excessive input/output evaluation as tasks had duplicate reference to output, input properties

With this change we should have less directory scanning in builds. Especially the duplicate scanning of `build/test-results`

and `build/reports/tests` has been removed which should result in faster test task execution and also faster processing of

up-to-date `Test` tasks.

    • -1
    • +1
    ./AnnotationProcessingTaskFactory.java
  1. … 1 more file in changeset.
Promote some instance constants to class constants

The `Validator` class should be static, and carries too much context with it: the outer task factory class is kept, resulting in unnecessary memory usage. Same for some class constants, that were declared as instance constants: all the anonymous inner class retained a reference to `AnnotationProcessingTaskFactory`. Having non static members also prevents the JIT from being agressive about inlining or unrolling loops.

    • -15
    • +14
    ./AnnotationProcessingTaskFactory.java
Revert direct path access for services

+review REVIEW-5645

  1. … 35 more files in changeset.
Mark services with `@Service`, and reference them via path in the model

Also fixes rule-cycles in Android plugin.

+review REVIEW-5640

  1. … 38 more files in changeset.
Minor tweak to field lookup.

    • -12
    • +11
    ./AnnotationProcessingTaskFactory.java
get rid of NoSuchFieldExceptions in AnnotationProcessingTaskFactory

+review REVIEW-5624

    • -26
    • +25
    ./AnnotationProcessingTaskFactory.java
Moved knowledge of the default task implementation to TaskFactory.

  1. … 2 more files in changeset.
Changed ITaskFactory so that it extends NamedEntityInstantiator, to tease apart TaskContainer from the logic that knows how to create a task.

    • -2
    • +10
    ./AnnotationProcessingTaskFactory.java
  1. … 2 more files in changeset.
Minor improvement to method names.

+review REVIEW-5286

    • -2
    • +2
    ./AnnotationProcessingTaskFactory.java
    • -1
    • +1
    ./OutputDirectoryPropertyAnnotationHandler.java
    • -1
    • +1
    ./OutputFilePropertyAnnotationHandler.java
  1. … 6 more files in changeset.
Use method names that better describe their purpose

+review REVIEW-5286

    • -2
    • +2
    ./AnnotationProcessingTaskFactory.java
    • -1
    • +1
    ./OutputDirectoryPropertyAnnotationHandler.java
    • -1
    • +1
    ./OutputFilePropertyAnnotationHandler.java
  1. … 6 more files in changeset.
DefaultTask based task implementation opts in to parallel execution via annotation

+review REVIEW-5286

    • -3
    • +3
    ./AnnotationProcessingTaskFactory.java
    • -2
    • +2
    ./InputDirectoryPropertyAnnotationHandler.java
    • -2
    • +2
    ./InputFilePropertyAnnotationHandler.java
    • -2
    • +2
    ./InputFilesPropertyAnnotationHandler.java
    • -2
    • +2
    ./NestedBeanPropertyAnnotationHandler.java
    • -2
    • +3
    ./OutputDirectoryPropertyAnnotationHandler.java
    • -2
    • +3
    ./OutputFilePropertyAnnotationHandler.java
  1. … 17 more files in changeset.
Minor tweaks to build with Java 8.

    • -1
    • +1
    ./AnnotationProcessingTaskFactory.java
  1. … 5 more files in changeset.
Some cleanups to in-memory ModuleComponentRepository caching

- Split DependencyMetaDataCache into separate artifacts and metadata cache classes

- Use 2 separate metadata cache instances, one for local and one for remote access

- Renamed a bunch of classes to InMemoryCache*

    • -1
    • +0
    ./AnnotationProcessingTaskFactory.java
  1. … 19 more files in changeset.
GRADLEREV-51 - replace some usages of Groovy based reflection with Java based.

    • -3
    • +2
    ./AnnotationProcessingTaskFactory.java
  1. … 1 more file in changeset.
Remove @author tags and names from source code.

- Added checkstyle check for @author

- Added not to CONTRIBUTING.md saying that we don't use names in the codebase

  1. … 1212 more files in changeset.
GRADLE-2755: Evaluate task parameter and fail if a parameter does not exist.

  1. … 2 more files in changeset.
Replace unnecessarily Groovy enabled method dispatch with plain Java.

    • -1
    • +2
    ./AnnotationProcessingTaskFactory.java
  1. … 1 more file in changeset.
Merge branch 'release'

    • -1
    • +7
    ./AnnotationProcessingTaskFactory.java
Disable deprecation warnings when reading annotated (e.g. @Input) task properties.

    • -1
    • +7
    ./AnnotationProcessingTaskFactory.java
Avoid scanning task classes that we know don't have annotated props.

Will save some redundant cycles, particularly as there is no caching in place here so we were scanning AbstractTask and friends for every instance.

    • -6
    • +11
    ./AnnotationProcessingTaskFactory.java
GRADLE-2815 - Support @Input on “is” boolean getters (e.g.. isSomeFlag()).

This is only supported if the method declares that it returns a “boolean” (not Boolean) as per the Java beans spec.

    • -6
    • +10
    ./AnnotationProcessingTaskFactory.java
  1. … 1 more file in changeset.
Renamed/moved classes in the incremental task API - o.g.a.tasks.TaskInputChanges -> o.g.a.tasks.incremental.IncrementalTaskInputs - o.g.a.tasks.TaskInputChanges.InputFileChange -> o.g.a.tasks.incremental.InputFile - Added incremental.InputFile to dsl doc

    • -2
    • +3
    ./AnnotationProcessingTaskFactory.java
  1. … 27 more files in changeset.
REVIEW-1930: Unit test coverage for annotation processing of incremental TaskAction methods

    • -1
    • +3
    ./AnnotationProcessingTaskFactory.java
  1. … 1 more file in changeset.
Cleaned up the TaskExecuter chain to work better with incremental tasks - Replaced IncrementalTaskAction with TaskAction interface, which can be contextualised with a TaskExecutionContext prior to execution - Any Action<Task> supplied to a task is now wrapped as a TaskAction - TaskExecuter chain now passes a TaskExecutionContext - SkipUpToDateTaskExecuter adds TaskArtifactState to the context - ExecuteActionsTaskExecuter contextualises any TaskAction prior to execution - Removed Task.isIncrementalTask(): this was only required to bypass the short-circuit when a task has no outputs - Currently are forcing incremental task to have outputs using Task.upToDateWhen {true}

    • -22
    • +32
    ./AnnotationProcessingTaskFactory.java
  1. … 20 more files in changeset.
REVIEW-2040: inner class can be static

    • -1
    • +1
    ./AnnotationProcessingTaskFactory.java
DRAFT: move context and improve

    • -33
    • +44
    ./AnnotationProcessingTaskFactory.java
  1. … 8 more files in changeset.