/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * License); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

buildscript {
    repositories {
        mavenCentral()
        gradlePluginPortal()
    }
    dependencies {
        classpath "gradle.plugin.com.github.johnrengelman:shadow:7.1.2"
    }
}

plugins {
    id 'idea'
    id 'java'
}

apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'

allprojects {

    group 'com.google.beam.workshop'
    version '0.0.1'

    ext {
        beamVersion = '2.39.0'
    }

    repositories {
        mavenCentral()
    }
}

java {
    sourceCompatibility = "1.11"
    targetCompatibility = "1.11"
}


dependencies {
    // Main
    implementation group: 'org.apache.beam', name: 'beam-sdks-java-core', version: beamVersion

    // Expansion service
    implementation group: 'org.apache.beam', name: 'beam-sdks-java-expansion-service', version: beamVersion
    implementation(group: 'org.apache.beam', name: 'beam-runners-google-cloud-dataflow-java', version: beamVersion) {
        exclude group: 'io.confluent', module: 'kafka-schema-registry-client'
        exclude group: 'io.confluent', module: 'kafka-avro-serializer'
    }

    // Logger implementation for SLF4J.
    implementation group: 'org.slf4j', name: 'slf4j-jdk14', version: '1.7.5'

    testImplementation group: 'org.apache.beam', name: 'beam-runners-direct-java', version: beamVersion
    testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3'
    testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
    testImplementation 'junit:junit:4.13.2'
}
