-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
47 lines (40 loc) · 1.7 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
plugins {
id 'com.github.johnrengelman.shadow' version '1.2.2'
id 'idea'
}
import org.apache.tools.ant.taskdefs.condition.Os
project.ext {
scalaBinary = project.hasProperty('scalaBinary') ? project.getProperty('scalaBinary') : '2.11'
scalaVersion = project.hasProperty('scalaVersion') ? project.getProperty('scalaVersion') : '2.11.6'
javaVersion = scalaBinary == '2.11' ? '1.8' : '1.7'
dl4jVersion = project.hasProperty('dl4j') ? project.getProperty('dl4j') : '0.4-rc3.10-SNAPSHOT'
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
os = 'windows-x86_64'
} else {
os = 'linux-x86_64'
}
println('Scala Binary: ' + scalaBinary + ' - Scala Version: ' + scalaVersion + ' - Java: ' + javaVersion + ' - DL4J: ' + dl4jVersion)
}
subprojects {
apply plugin: 'scala'
repositories {
mavenLocal()
mavenCentral()
// maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
compileScala {
scalaCompileOptions.useCompileDaemon = true
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.useAnt = false
sourceCompatibility = project.javaVersion
targetCompatibility = project.javaVersion
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile 'org.scalatest:scalatest_' + project.scalaBinary + ':3.0.0-M7'
compile(group: 'org.scala-lang', name: 'scala-library', version: project.scalaVersion) { force = true }
compile(group: 'org.scala-lang', name: 'scala-compiler', version: project.scalaVersion) { force = true }
compile(group: 'org.scala-lang', name: 'scala-reflect', version: project.scalaVersion) { force = true }
}
}