class Jars::Installer
def jars?
def jars? # first look if there are any requirements in the spec # and then if gem depends on jar-dependencies for runtime. # only then install the jars declared in the requirements result = (spec = self.spec) && !spec.requirements.empty? && spec.dependencies.detect { |d| d.name == 'jar-dependencies' && d.type == :runtime } if result && spec.platform.to_s != 'java' Jars.warn "\njar dependencies found on non-java platform gem - do not install jars\n" false else result end end