forked from nixops/batm_public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
53 lines (51 loc) · 1.63 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
48
49
50
51
52
53
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}
final File repoDir = project.file('libs')
allprojects {
repositories {
jcenter()
}
repositories {
//bitcoin-json-rpc-client-1.0.jar isn't part of any well known maven repo
//so we search the libs dir; gradle generates (guesses) metadata except dependencies.
//Artifacts from repos with real metadata take precedence.
flatDir {
dirs repoDir
}
}
//cross-compilation stuff for Java 7
assert (System.env.JDK_7_HOME != null): "Set environment variable JDK_7_HOME"
project.ext.targetJavaHome = System.env.JDK_7_HOME
def javaExecutablesPath = new File(targetJavaHome, 'bin')
def javaExecutables = [:].withDefault { execName ->
def executable = new File(javaExecutablesPath, execName)
assert executable.exists(): "There is no ${execName} executable in ${javaExecutablesPath}"
executable
}
tasks.withType(JavaCompile) {
project.sourceCompatibility = '1.7'
options.with {
fork = true
forkOptions.javaHome = file(targetJavaHome)
}
}
tasks.withType(Javadoc) {
executable = javaExecutables.javadoc
}
tasks.withType(Test) {
executable = javaExecutables.java
}
tasks.withType(JavaExec) {
executable = javaExecutables.java
}
}
ext.with {
BatmDependencySubstitutionConfig = file('dependencySubstitutions.txt')
}