-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
108 lines (90 loc) · 3.31 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
apply plugin: 'java'
apply plugin: 'application'
sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
group = 'org.audiveris'
version = '1.0.0'
ext.programName = "${rootProject.name}"
ext.targetOSName = System.getProperty('os.name').toLowerCase()\
.startsWith('mac os x') ? 'macosx' :\
System.getProperty('os.name').split(' ')[0].toLowerCase()
ext.targetOSArch = ["i386":"x86", "i486":"x86", "i586":"x86", "i686":"x86",
"amd64":"x86_64", "x86-64":"x86_64", "x86_64":"x86_64"]\
[System.getProperty('os.arch').toLowerCase()]
ext.targetOS = "${project.ext.targetOSName}-${project.ext.targetOSArch}"
println "targetOS=${project.ext.targetOS}"
ext.dl4jVersion = '0.8.0'
ext.nd4jVersion = '0.8.0'
// Ability to set a different main class
if (!hasProperty('mainClass')) {
ext.mainClass = 'org.audiveris.omrdataset.Main'
}
mainClassName = ext.mainClass
// Useful for turning on deprecation warnings
// Just uncomment the appropriate option
allprojects {
tasks.withType(JavaCompile) {
//options.compilerArgs << "-Xlint:deprecation"
//options.compilerArgs << "-Xlint:unchecked"
}
}
run {
minHeapSize = '512m'
maxHeapSize = '2g'
// Retrieve CLI arguments from cmdLineArgs property if any
if (project.hasProperty("cmdLineArgs")) {
args(cmdLineArgs.split(','))
}
}
repositories {
mavenCentral()
// You may define additional repositories, or even remove "mavenCentral()".
// Read more about repositories here:
// http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:repositories
}
dependencies {
compile(
[group: 'args4j', name: 'args4j', version: '2.33'],
[group: 'org.slf4j', name: 'slf4j-api', version: '1.7.21'],
[group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.7'],
[group: 'org.deeplearning4j', name: 'deeplearning4j-core', version: "${project.ext.dl4jVersion}"],
[group: 'org.deeplearning4j', name: 'deeplearning4j-ui_2.10', version: "${project.ext.dl4jVersion}"],
[group: 'org.nd4j', name: 'nd4j-native', version: "${project.ext.nd4jVersion}"]
)
runtime(
[group: 'org.nd4j', name: 'nd4j-native', version: "${project.ext.nd4jVersion}", classifier: "${project.ext.targetOS}"]
)
testCompile(
[ group: 'junit', name: 'junit', version: '4.10']
)
}
// Avoid JDK8 too strict javadoc
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
javadoc {
doFirst {
copy {
from "src/main/java/org/audiveris/omrdataset"
into "$buildDir/docs/javadoc/org/audiveris/omrdataset"
include ("*/doc-files/**")
}
}
title = "${project.ext.programName}-${version} API"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}