/
build.gradle
116 lines (93 loc) · 2.94 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
109
110
111
112
113
114
115
116
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'application'
archivesBaseName = "export"
group = 'se.kb.libris'
version = '3.0.0-alpha'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
def groovyVersion=GroovySystem.getVersion()
compile "org.codehaus.groovy:groovy-all:${groovyVersion}"
compile 'com.github.libris:jmarctools:90edfc74bcc006c2d45674cd67fbdc2db0964a97'
compile 'com.github.libris:isbntools:e70a5fbedb88bb2349de3ed5ff98e4475e8f7e1a'
compile group: 'com.ibm.icu', name: 'icu4j', version: '4.8.1.1'
compile group: 'org.dspace', name: 'xoai', version: '3.2.10'
compile fileTree(dir: 'libs', include: '*.jar')
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
maven { url "http://repository.codehaus.org/" }
maven { url "https://jitpack.io" }
}
sourceSets {
main {
java { srcDir 'src/main/java' }
groovy { srcDir 'src/main/groovy' }
}
test {
groovy { srcDir 'src/test/groovy/' }
}
}
task(console, dependsOn: 'classes', type: JavaExec) {
description "Launch a Groovy Console"
classpath = sourceSets.main.runtimeClasspath
main = 'groovy.ui.Console'
}
task get_records (dependsOn: 'classes', type: JavaExec) {
standardInput = System.in
main = 'GetRecords'
classpath = sourceSets.main.runtimeClasspath
}
task get_records_xl (dependsOn: 'classes', type: JavaExec) {
standardInput = System.in
main = 'GetRecords_xl'
classpath = sourceSets.main.runtimeClasspath
}
task list_changes (dependsOn: 'classes', type: JavaExec) {
if (project.hasProperty('range')) {
args(range.split(','))
}
standardInput = System.in
main = 'ListChanges'
classpath = sourceSets.main.runtimeClasspath
}
task list_changes_xl (dependsOn: 'classes', type: JavaExec) {
if (project.hasProperty('range')) {
args(range.split(','))
}
standardInput = System.in
main = 'ListChanges_xl'
classpath = sourceSets.main.runtimeClasspath
}
task listen (dependsOn: 'classes', type: JavaExec) {
Set a = []
if (project.hasProperty("options")) a.addAll(project.getProperty("options").split());
if (project.hasProperty("profile")) a.add(project.getProperty("profile"));
if (project.hasProperty("config")) a.add(project.getProperty("config"));
args(a)
standardInput = System.in
main = 'se.kb.libris.export.listener.OaiPmhListener'
classpath = sourceSets.main.runtimeClasspath
}
// Fat JAR packaging
jar {
manifest {
attributes "Main-Class": "Main"
}
from {
configurations.compile.collect {
it.isDirectory() ? it : project.zipTree(it).matching {
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA','build','.gradle/**','build.gradle','gradle','gradlew','gradlew.bat','test'
}
}
}
}