github.com/apache/beam/sdks/v2@v2.48.2/java/io/thrift/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 "org.jruyi.thrift" version "0.4.1" 22 } 23 applyJavaNature( 24 automaticModuleName: 'org.apache.beam.sdk.io.thrift', 25 generatedClassPatterns: [ 26 /^org\.apache\.beam\.sdk\.io\.thrift\.payloads.*/, 27 /^org\.apache\.beam\.sdk\.io\.thrift\.TestThriftStruct/, 28 /^org\.apache\.beam\.sdk\.io\.thrift\.TestThriftInnerStruct/, 29 /^org\.apache\.beam\.sdk\.io\.thrift\.TestThriftEnum/, 30 /^org\.apache\.beam\.sdk\.io\.thrift\.TestThriftUnion/, 31 ], 32 ) 33 34 description = "Apache Beam :: SDKs :: Java :: IO :: Thrift" 35 ext.summary = "IO to read and write Thrift encoded data files" 36 37 dependencies { 38 implementation library.java.vendored_guava_26_0_jre 39 implementation library.java.slf4j_api 40 implementation "org.apache.thrift:libthrift:0.14.1" 41 implementation project(path: ":sdks:java:core", configuration: "shadow") 42 testImplementation library.java.junit 43 testRuntimeOnly library.java.slf4j_jdk14 44 testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") 45 } 46 /* 47 Removed due to lack of Thrift on Jenkins workers. 48 compileThrift { 49 createGenFolder false 50 sourceDir "$projectDir/src/test/resources/thrift" 51 generator 'java' 52 } 53 54 task copyThrift(type: Copy) { 55 dependsOn(compileThrift) 56 from file("$buildDir/generated-sources/thrift/test_thrift/TestThriftStruct.java") 57 into file("$projectDir/src/test/java/org/apache/beam/sdk/io/thrift/TestThriftStruct.java") 58 } 59 60 compileTestJava { 61 doFirst { copyThrift } 62 } 63 */