@Override
		protected Stream<String> extractDependencies(String line) {
			if (line.startsWith(DEPS_COMMENT_PREFIX)) {
				return Arrays.stream(line.split(" // ")[0].split("[ ;,]+")).skip(1).map(String::trim);
			}

			if (line.contains(DEPS_ANNOT_PREFIX)) {
				int commentOrEnd = line.indexOf("//");
				if (commentOrEnd < 0) {
					commentOrEnd = line.length();
				}
				if (line.indexOf(DEPS_ANNOT_PREFIX) > commentOrEnd) {
					// ignore if on line that is a comment
					return Stream.of();
				}

				Map<String, String> args = new HashMap<>();

				Matcher matcher = DEPS_ANNOT_PAIRS.matcher(line);
				while (matcher.find()) {
					args.put(matcher.group("key"), matcher.group("value"));
				}
				if (!args.isEmpty()) {
					// groupId:artifactId:version[:classifier][@type]
					String gav = Stream.of(
							args.get("group"),
							args.get("module"),
							args.get("version"),
							args.get("classifier"))
						.filter(Objects::nonNull)
						.collect(Collectors.joining(":"));
					if (args.containsKey("ext")) {
						gav = gav + "@" + args.get("ext");
					}
					if (!gav.isEmpty()) { // protects when @Grab might be inside a string (like jbang source)
						return Stream.of(gav);
					} else {
						return Stream.empty();
					}
				} else {
					matcher = DEPS_ANNOT_SINGLE.matcher(line);
					if (matcher.find()) {
						return Stream.of(matcher.group("value"));
					}
				}
			}

			return Stream.of();
		}
This class extends the default <code>TagReader</code> with support for Groovy
"grab" annotations.
src/main/java/dev/jbang/source/TagReader.java