-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle
More file actions
68 lines (56 loc) · 1.71 KB
/
Copy pathbuild.gradle
File metadata and controls
68 lines (56 loc) · 1.71 KB
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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath 'org.ajoberstar:gradle-git:1.3.2'
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.2.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'net.nemerosa:versioning:2.1.0'
}
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'org.kordamp.gradle.stats'
apply plugin: 'com.github.ben-manes.versions'
apply from: 'gradle/publishing.gradle'
apply from: 'gradle/code-coverage.gradle'
apply from: 'gradle/code-quality.gradle'
repositories {
jcenter()
}
sourceCompatibility=1.7
targetCompatibility=1.7
dependencies {
compile 'io.reactivex:rxjava:1.0.14'
compile 'io.dropwizard.metrics:metrics-core:3.1.2'
compile 'com.google.guava:guava:18.0'
compile 'joda-time:joda-time:2.3'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'junit:junit:4.12'
}
task sourcesJar(type: Jar) {
group 'Build'
description 'An archive of the source code'
classifier 'sources'
from sourceSets.main.allSource
}
jar.finalizedBy sourcesJar
artifacts {
sourcesJar
}
gradle.taskGraph.whenReady {
def createIfNotExists = { File dir ->
if (!dir.exists()) {
dir.mkdirs()
}
}
String sourceSetName = project.plugins.hasPlugin('groovy') ? 'groovy' : 'java'
sourceSets.main[sourceSetName].srcDirs.each(createIfNotExists)
sourceSets.test[sourceSetName].srcDirs.each(createIfNotExists)
sourceSets.main.resources.srcDirs.each(createIfNotExists)
sourceSets.test.resources.srcDirs.each(createIfNotExists)
}