-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
64 lines (55 loc) · 1.76 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
classpath 'org.ajoberstar:gradle-git:0.12.0'
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.1.3'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.8'
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.1.9'
}
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'build-dashboard'
apply plugin: 'org.kordamp.gradle.stats'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: "info.solidsoft.pitest"
apply from: 'gradle/publishing.gradle'
apply from: 'gradle/code-coverage.gradle'
apply from: 'gradle/code-quality.gradle'
repositories {
mavenLocal()
jcenter()
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-all:1.8.4'
}
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)
}