From aa02fa85da7c7aa9224f47c4d6d2df2acb2424f8 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Sun, 19 Mar 2017 15:58:19 +0000 Subject: [PATCH] [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 --- plugin/build.gradle | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugin/build.gradle b/plugin/build.gradle index 9180a670756..87c63841ee0 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -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