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

User Guide Manifest Examples Invalid in section 10.8.4

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.5.2
    • Fix Version/s: 0.6

      Description

      http://gradle.org/userguide/0.5.2/userguidech10.html#x28-4700010
      10.8.4 Manifest

      Both examples in this section have the below incorrect line:

      manifest.mainAttributes(Implementation-Title: "Gradle", Implementation-Version: $version)

      This is invalid Groovy code because of the '-' in both Implementation-Title and Implementation-Version

      When attempting to build, the following error occurs because it's trying to treat Implementation-Title as an expression, instead of as a String.

      build_gradle: 11: illegal colon after argument expression;
      solution: a complex label expression before a colon must be parenthesized @ line 11, column 34.

      The below is all that's needed to correct the example, and is arguably a good practice because you are forcing it to treat the key as a string value.

      manifest.mainAttributes("Implementation-Title": "Gradle", "Implementation-Version": $version)

        Attachments

          Activity

            People

            Assignee:
            adammurdoch Adam Murdoch
            Reporter:
            merscwog Spencer Allain
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: