Hello members of the Gradle community,
I have a problem with rosjava, and it so happens to be that rosjava uses the Gradle build system. So this makes it a Gradle issue.
My build.gradle file looks like this:
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'application'
mainClassName = 'org.ros.RosRun'
group 'ros.rosjava_core'
version = '0.0.0'
sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories {
mavenLocal()
maven {
url 'http://robotbrains.hideho.org/nexus/content/groups/ros-public'
}
flatDir dirs: 'lib'
}
dependencies {
compile project(':rosjava')
compile name: 'JSHOP2', changing: true
compile name: 'antlr'
compile name: 'planning'
}
configurations.all {
resolutionStrategy.cacheDynamicVersionsFor 3, 'seconds'
resolutionStrategy.cacheChangingModulesFor 3, 'seconds'
}
It gives no errors.
I have a rosjava “node”, that calls a function from my Java dependency (JSHOP2) which is on my local filesystem. It gets the output of the function, it works fine. But then, my rosjava node keeps running, but my Java dependency gets automatically recompiled. I get no errors in this process, but when the function is called from my dependency I get the old output instead of the new one, even though the dependency is changed. If I check the jar-file of my dependency it is clearly changed.
I read that a dependency needs to implement the ExternalModuleDependency interface of Gradle to get a dynamic linked dependency. However, Files and FileTrees do not implement this interface. Is there any way to work around this?
Am I doing something wrong?
Kind regards, Pieterjan van Gastel