github.com/apache/beam/sdks/v2@v2.48.2/java/extensions/sql/shell/build.gradle (about) 1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * License); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an AS IS BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 plugins { 20 id 'org.apache.beam.module' 21 id 'application' 22 } 23 24 dependencies { 25 implementation project(":sdks:java:extensions:sql:jdbc") 26 permitUnusedDeclared project(":sdks:java:extensions:sql:jdbc") 27 28 if (project.hasProperty("beam.sql.shell.bundled")) { 29 project.getProperty("beam.sql.shell.bundled").tokenize(",").each { 30 subproject -> 31 implementation project(path: subproject) 32 permitUnusedDeclared project(path: subproject) 33 } 34 } 35 } 36 37 processResources { 38 filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [ 39 'beam.version': version, 40 ] 41 } 42 43 mainClassName = "org.apache.beam.sdk.extensions.sql.jdbc.BeamSqlLine" 44 45 /** 46 * Gradle console will interfere with SQL shell, so to run this command 47 * we need to configure it: 48 * - disable daemon with '--no-daemon'; 49 * - decrease verbosity with '--console plain'; 50 * - quiet it with '-q'; 51 * 52 * So, correct gradle invocation to start the SQL shell 53 * looks something like this: 54 * 55 * ./gradlew :sdks:java:extensions:sql:shell:run --console plain -q --no-daemon 56 */ 57 run { 58 standardInput System.in 59 }