From f1b6bf76b6f916cf5b1b95d9d193ff9af456bccd Mon Sep 17 00:00:00 2001 From: Tomoyuki Morita Date: Tue, 18 Jun 2024 08:31:08 -0700 Subject: [PATCH] Exclude integ-test and download task when built offline Signed-off-by: Tomoyuki Morita --- async-query-core/build.gradle | 7 +++++-- settings.gradle | 5 ++++- 2 files changed, 9 insertions(+), 3 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..80fc47c031 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,7 +9,10 @@ rootProject.name = 'opensearch-sql' include 'opensearch-sql-plugin' project(':opensearch-sql-plugin').projectDir = file('plugin') include 'ppl' -include 'integ-test' +// exclude integ-test in case of offline build +if (!gradle.startParameter.offline) { + include 'integ-test' +} include 'common' include 'opensearch' include 'core'