From 07e52d97ae9d17b9f7588e5345dcfc7b109eafe1 Mon Sep 17 00:00:00 2001 From: Tomoyuki MORITA Date: Tue, 18 Jun 2024 17:28:20 -0700 Subject: [PATCH] Exclude integ-test, doctest and download task when built offline (#2760) Signed-off-by: Tomoyuki Morita --- async-query-core/build.gradle | 7 +++++-- settings.gradle | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/async-query-core/build.gradle b/async-query-core/build.gradle index abdda4a4e0..176d14950f 100644 --- a/async-query-core/build.gradle +++ b/async-query-core/build.gradle @@ -38,8 +38,11 @@ configurations { } } -// Make sure the downloadG4File task runs before the generateGrammarSource task -generateGrammarSource.dependsOn downloadG4Files +// skip download in case of offline build +if (!gradle.startParameter.offline) { + // Make sure the downloadG4File task runs before the generateGrammarSource task + generateGrammarSource.dependsOn downloadG4Files +} dependencies { antlr "org.antlr:antlr4:4.7.1" diff --git a/settings.gradle b/settings.gradle index f09e18c8d1..9cf1715335 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,12 +9,10 @@ rootProject.name = 'opensearch-sql' include 'opensearch-sql-plugin' project(':opensearch-sql-plugin').projectDir = file('plugin') include 'ppl' -include 'integ-test' include 'common' include 'opensearch' include 'core' include 'protocol' -include 'doctest' include 'legacy' include 'sql' include 'prometheus' @@ -23,3 +21,9 @@ include 'datasources' include 'spark' include 'async-query-core' include 'async-query' + +// exclude integ-test/doctest in case of offline build since they need downloads +if (!gradle.startParameter.offline) { + include 'integ-test' + include 'doctest' +}