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' +}