/*
 * 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.
 */

plugins {
    id 'scala'
}

description = 'mnemonic-spark-core'

compileJava {
  options.compilerArgs = [
    "-processor", "org.apache.mnemonic.DurableEntityProcessor"
  ]
}

compileTestJava {
  options.compilerArgs = [
    "-processor", "org.apache.mnemonic.DurableEntityProcessor"
  ]
}

dependencies {
  def spark_version = '2.3.0'
  def scala_version = '2.11.12'
  def scala_bin_version = '2.11'
  def scalatest_version = '3.0.1'

  annotationProcessor project(':mnemonic-core')
  api project(':mnemonic-collections')
  api project(':mnemonic-sessions')
  api 'org.apache.commons:commons-lang3'
  implementation "org.apache.spark:spark-core_${scala_bin_version}:${spark_version}"
  implementation "org.apache.spark:spark-mllib_${scala_bin_version}:${spark_version}"
  implementation "org.scala-lang:scala-library:${scala_version}"
  api 'org.apache.logging.log4j:log4j-slf4j-impl'
  testCompileOnly 'org.testng:testng'
  testImplementation "org.scalatest:scalatest_${scala_bin_version}:${scalatest_version}"
}

test.useTestNG()
