| /* |
| * 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. |
| */ |
| |
| apply plugin: 'scala' |
| apply plugin: 'application' |
| apply plugin: 'eclipse' |
| apply plugin: 'maven' |
| apply plugin: 'org.scoverage' |
| apply plugin: 'com.lightbend.akka.grpc.gradle' |
| |
| ext.dockerImageName = 'scheduler' |
| apply from: '../../gradle/docker.gradle' |
| distDocker.dependsOn ':common:scala:distDocker', 'distTar' |
| |
| project.archivesBaseName = "openwhisk-scheduler" |
| |
| ext.coverageDirs = [ |
| "${buildDir}/classes/scala/scoverage", |
| "${project(':common:scala').buildDir.absolutePath}/classes/scala/scoverage" |
| ] |
| distDockerCoverage.dependsOn ':common:scala:scoverageClasses', 'scoverageClasses' |
| |
| buildscript { |
| repositories { |
| mavenLocal() |
| maven { |
| url "https://plugins.gradle.org/m2/" |
| } |
| } |
| dependencies { |
| // see https://plugins.gradle.org/plugin/com.lightbend.akka.grpc.gradle |
| // for the currently latest version. |
| classpath 'gradle.plugin.com.lightbend.akka.grpc:akka-grpc-gradle-plugin:0.7.2' |
| } |
| } |
| |
| // Define a separate configuration for managing the dependency on Jetty ALPN agent. |
| configurations { |
| alpnagent |
| } |
| |
| dependencies { |
| configurations.all { |
| resolutionStrategy.force "com.lihaoyi:fastparse_${gradle.scala.depVersion}:2.1.3" |
| resolutionStrategy.force "com.typesafe.akka:akka-http-core_${gradle.scala.depVersion}:${gradle.akka_http.version}" |
| resolutionStrategy.force "com.typesafe.akka:akka-http_${gradle.scala.depVersion}:${gradle.akka_http.version}" |
| resolutionStrategy.force "com.typesafe.akka:akka-http2-support_${gradle.scala.depVersion}:${gradle.akka_http.version}" |
| resolutionStrategy.force "com.typesafe.akka:akka-http-spray-json_${gradle.scala.depVersion}:${gradle.akka_http.version}" |
| resolutionStrategy.force "com.typesafe.akka:akka-parsing_${gradle.scala.depVersion}:${gradle.akka_http.version}" |
| resolutionStrategy.force "com.typesafe.akka:akka-http_${gradle.scala.depVersion}:${gradle.akka_http.version}" |
| } |
| |
| compile "org.scala-lang:scala-library:${gradle.scala.version}" |
| compile "io.altoo:akka-kryo-serialization_${gradle.scala.depVersion}:1.0.0" |
| compile project(':common:scala') |
| } |
| |
| // workaround for akka-grpc |
| // https://github.com/akka/akka-grpc/issues/786 |
| printProtocLogs.doFirst { |
| mkdir "$buildDir" |
| file("$buildDir/akka-grpc-gradle-plugin.log").text = "x" |
| mkdir "$project.rootDir/build" |
| file("$project.rootDir/build/akka-grpc-gradle-plugin.log").text = "x" |
| } |
| printProtocLogs.configure { |
| mkdir "$buildDir" |
| file("$buildDir/akka-grpc-gradle-plugin.log").text = "x" |
| mkdir "$project.rootDir/build" |
| file("$project.rootDir/build/akka-grpc-gradle-plugin.log").text = "x" |
| } |
| |
| mainClassName = "org.apache.openwhisk.core.scheduler.Scheduler" |
| applicationDefaultJvmArgs = ["-Djava.security.egd=file:/dev/./urandom"] |