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

Method in build.gradle not available in imported scripts (regression in 1.12)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.12
    • Fix Version/s: 2.0-rc-1
    • Known Issue Of:

      Description

      when a method is defined in build.gradle, it's no longer available to the scripts that build.gradle includes.
      Example:
      -build.gradle-
      void echo(String string)

      { logger.quiet string }


      apply from: file('include.gradle')

      -include.gradle-
      task myTask

      { echo('this used to work') }

      This used to work with version 1.11 (and since at least 1.1, which is the oldest Gradle version that I still had handy).

        Attachments

          Activity

            People

            Assignee:
            ldaley Luke Daley
            Reporter:
            breskeby René Gröschke (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            10 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: