Importing classes in gradle 1.6


This works perfectly in gradle 1.3, but for some reason doesn’t work in 1.6. I’m trying to import several classes into my build, to use as part of the build process. In 1.3 I can do the below with no issues at all, but 1.6 I get “unable to resolve class”. Any ideas? I have the libraries in the GRADLE_HOME/lib directory. I’d assumed this would be part of the classpath?


import javax.jms.MessageConsumer import org.apache.activemq.ActiveMQConnection

build.gradle’: 164: unable to resolve class javax.jms.MessageConsumer

@ line 164, column 1.

import javax.jms.MessageConsumer

build.gradle’: 171: unable to resolve class org.apache.activemq.ActiveMQConnection

@ line 171, column 1.

import org.apache.activemq.ActiveMQConnection


This is no longer a supported method of adding things to the classpath as it’s not portable and dangerous.

Please see this note in the migration guide for 1.0-milestone-5 where this was introduced for solutions.

Yep that worked fine. Thanks.