Java variant builds & JDK9+ modules

Is it possible within the same subproject to use variants to build both a non-module and a module Jar?