diff --git a/.gitignore b/.gitignore index 9fe5a5c..0c9b6d9 100644 --- a/.gitignore +++ b/.gitignore @@ -70,6 +70,7 @@ target/ # Gradle .gradle +META-INF/ # Commands history .cli_history diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..91ee83e --- /dev/null +++ b/gradle.properties @@ -0,0 +1,5 @@ +# Gradle properties for SQL CLI + +# Uncomment to use local SQL project instead of published Maven artifacts +# This is useful for development when you need to make changes in both projects +# useLocalSql=true diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..af9aea8 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +rootProject.name = 'opensearch-sql-cli' + +// Optionally include the local SQL project as a composite build +// This allows you to develop against local changes in the sql project +// Enable by passing -PuseLocalSql=true or adding useLocalSql=true to gradle.properties +if (settings.hasProperty('useLocalSql') && settings.useLocalSql == 'true') { + println "Using local SQL project for unified-query dependencies" + + includeBuild('../sql') { + dependencySubstitution { + // Substitute the Maven artifacts with local project modules + substitute module('org.opensearch.query:unified-query-common') using project(':common') + substitute module('org.opensearch.query:unified-query-core') using project(':core') + substitute module('org.opensearch.query:unified-query-opensearch') using project(':opensearch') + substitute module('org.opensearch.query:unified-query-ppl') using project(':ppl') + substitute module('org.opensearch.query:unified-query-sql') using project(':sql') + substitute module('org.opensearch.query:unified-query-protocol') using project(':protocol') + } + } +} else { + println "Using published Maven artifacts for unified-query dependencies" + println "To use local SQL project, run with -PuseLocalSql=true" +}