Instead of considering things from jars to be reloadable if
they are in the same package as subtypes that are also reloadable
it is better to just make the test (isTopmostReloadable()) smarter.
This test determines which reloadable type is the highest in
the hierarchy and gets extra state added to it. With a 'dumb test'
it was assuming further parents were reloadable because they
were in the same package as the subtype. Now it does a more
costly, more precise check.
The original solution had problems because if you made some classes
from a jar reloadable, that confused handled of other subclasses
of those types in other jars (that did not share the same package
name so would not have been made reloadable).
This area of the code to do with a bit of a smack with a
refactoring hammer to streamline it.
- if you force an inclusion via 'inclusions=foo..*' then
allow for everything in that package to be made reloadable
regardless of it coming from jar or disk.
- when inclusion patterns don't match fall back on regular
acceptance mechanisms (like package cache, etc) rather
than just dismissing it.
- the results of decision making around making things
reloadable are now enums/objects rather than plain booleans
so that later we can do further analysis on those
decisions.
Issue: https://github.com/grails/grails-core/issues/8817
New options watchJars takes a colon separated list of jars
(just the jar names, not paths). For example:
-Dspringloaded=watchJars=foo.jar:bar.jar
Committed some very basic tests that are passing, they are in
the SpringLoadedTestsInSeparateJVM test class, see the
tests with 'jar' in the name.