Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2579

SourceTask is always up-to-date after all source files are deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 3.2-rc-1

      Description

        1. Problem

      Gradle up-to-date check does not take into account deleted files. This has been confirmed for Gradle 1.3 with 'java' and 'groovy' plugins.

        1. Steps to reproduce:

      1. Create a build.gradle containing apply plugin: 'java'
      2. Create the directories src/main/java
      3. Create a file src/main/java/Foo.java containing public class Foo {}
      4. Execute gradle build - compileJava will be executed.
      5. Execute gradle build - compileJava will be UP-TO-DATE.
      6. Delete the file src/main/java/Foo.java.
      7. Execute gradle build - compileJava will still be UP-TO-DATE.

        1. Result
          Because of this, the deleted class will still be available in both build/classes/main and the created jar in build/lib.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lptr Lóránt Pintér
                Reporter:
                forums Gradle Forums
              • Votes:
                21 Vote for this issue
                Watchers:
                25 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: