Cheng XU 2bd9b2774d
java_requirement: set cask attribute
Set `@cask` attribute for JavaRequirement, which is used by
`brew info` to track cask requirement for formulae and
`brew bundle dump` to sort the formulae and casks.

Before:
```
$ brew info --json languagetool | jq '.[0].requirements'
[
  {
    "name": "java",
    "cask": null,
    "download": null
  }
]
$ brew cask install adoptopenjdk; brew install languagetool
$ brew bundle dump
brew "languagetool"
cask "adoptopenjdk"
```

After:
```
$ brew info --json languagetool | jq '.[0].requirements'
[
  {
    "name": "java",
    "cask": "adoptopenjdk",
    "download": null
  }
]
$ brew cask install adoptopenjdk; brew install languagetool
$ brew bundle dump
cask "adoptopenjdk"
brew "languagetool"
```

Also added relevant test cases.
2019-06-10 10:37:09 +08:00
..
2019-05-23 15:50:55 +08:00
2019-04-24 22:17:59 -04:00
2019-06-03 15:52:53 -03:00
2019-04-30 09:19:18 +01:00
2018-11-12 05:01:33 +01:00
2019-06-03 15:52:53 -03:00
2019-04-30 09:19:18 +01:00