forked from marklogic-community/marklogic-spring-batch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
110 lines (89 loc) · 2.78 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
allprojects {
task wrapper(type: Wrapper) {
gradleVersion = '2.14'
}
}
subprojects {
/*
* Not applying the bintray plugin. Couldn't get it working properly when declared
* in subprojects, and when declared at root level of this script, it caused an httpcomponents
* classpath issue with ml-gradle in the core project. So for now, each project has to
* duplicate bintray publishing configuration.
*/
apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "checkstyle"
repositories {
jcenter()
maven { url "http://repo.spring.io/milestone" }
maven { url "http://developer.marklogic.com/maven2/" }
mavenLocal()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceSets.test.resources.srcDir 'src/test/java'
checkstyle {
configFile = file("${project.rootDir}/dev-tools/checkstyle/checkstyle.xml")
toolVersion = '6.19'
}
}
configure(subprojects.findAll {it.name != 'jobs'}) {
apply plugin: "maven-publish"
task sourcesJar(type: Jar, dependsOn: classes) {
baseName = artifactId
version = project.version
classifier = 'sources'
from sourceSets.main.allSource
}
jar {
baseName = artifactId
version = project.version
}
/*
* Assumes each project has a single publication.
*/
publishing {
publications {
mainJavaWithSources(MavenPublication) {
groupId group
artifactId project.property("artifactId")
version project.version
from components.java
artifact sourcesJar
}
}
}
}
/**
* Include every project that you want to be part of the msb application.
*/
project(':core') {
dependencies {
runtime "org.springframework.batch:spring-batch-core:3.0.7.RELEASE"
runtime fileTree(include: ['*.jar'], dir: 'lib')
//com.marklogic.spring.batch.Main extends com.marklogic.client.helper.LoggingObject
runtime "com.marklogic:ml-javaclient-util:2.9.1"
//Main depends on joptsimple.OptionParser;
runtime "net.sf.jopt-simple:jopt-simple:5.0.1"
runtime "org.springframework:spring-jdbc:4.2.6.RELEASE"
}
}
project(':test') {
dependencies {
compile project(':core')
}
}
configure(subprojects.findAll {it.name != 'core' && it.name != "test"}) {
apply plugin: "application"
mainClassName = "com.marklogic.spring.batch.Main"
dependencies {
compile project(':core')
testCompile project(':test')
}
}
task testExamples(type: GradleBuild) {
buildFile = 'examples/build.gradle'
tasks = [ 'test' ]
}
task testAll(dependsOn:[':core:test', 'jobs:test', 'testExamples'] )