Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`.
Xcode >=10.2 is required to build all Swift formulae on macOS >=10.14.4.
Rather than requiring per-formula workarounds
(e.g. Homebrew/homebrew-core#39446) this provides a more stable platform
Homebrew can rely on for building Swift formulae.
This commit changes the message that appears when Homebrew detects
that a Java requirement is unmet.
The new message will say:
```
Install AdoptOpenJDK with Homebrew Cask:
brew cask install adoptopenjdk
```
And for Java 8:
```
Install AdoptOpenJDK 8 with Homebrew Cask:
brew cask install homebrew/cask-versions/adoptopenjdk8
```
The match obtained by applying the regular expression used to index into
the `stderr` member of the result of calling `system_command` in the relevant
variable assignment could yield unexpected results. The regular expression in-
volved was not strict enough and contained an unescaped period, which could
match any character, not just the expected literal decimal point. This commit
corrects this oversight by escaping the relevant character, thus addressing
@apjanke's remark in https://github.com/Homebrew/brew/pull/5280#issuecomment-437165119 on the existence of a:
> …possible bug - that `.` looks like it should be escaped as `\.` to match a
> literal ".".) …
/usr/libexec/java_home is specific to macOS.
Language::Java::java_home_cmd is not implemented on Linux and raises
NotImplementedError.
Add private Language::Java::java_home_shell and use it instead of java_home_cmd.
Add public Language::Java::java_home for use by formulae.
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
Use 124 max line length everywhere. Also, reduce tap max line length to
189 as Homebrew/homebrew-core has that as a maximum now. In future
Homebrew/homebrew-core will also be reduced to 124 maximum line length.
The `cask` attribute doesn't make as much sense on Linux but can be
ignored there. The advantage of this change is that (like #4086) it
allows figuring out the relevant cask for a formulae requirement on a
Linux machine.
These are ones that were either already deprecated due to audit rules
or are just a simple `which` with a `default_formula` so should just
be a dependency.