[ML] Reduce caching time for native code dependency to 0 (elastic/x-pack-elasticsearch#772)
Prior to this change the integration tests could fail for up to 24
hours after a change to the C++ output format
Original commit: elastic/x-pack-elasticsearch@b8d9fa0adb4227b3611e2a8e80ae77cf50dd32bc
@@ -176,7 +176,11 @@ licenseHeaders {
}
configurations {
- nativeBundle
+ nativeBundle {
+ // Check for new native code on every build, otherwise builds can
+ // fail for 24 hours after a change to the C++ output format
+ resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
+ }
}
if (findProject(':machine-learning-cpp') != null) {
@@ -214,7 +218,9 @@ dependencies {
// ml deps
compile 'net.sf.supercsv:super-csv:2.4.0'
- nativeBundle "org.elasticsearch.ml:ml-cpp:${project.version}@zip"
+ nativeBundle ("org.elasticsearch.ml:ml-cpp:${project.version}@zip") {
+ changing = true
+ }
testCompile 'org.ini4j:ini4j:0.5.2'
// common test deps
