-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
84 lines (72 loc) · 1.93 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
plugins {
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.6.3'
id 'groovy'
id 'maven-publish'
id 'com.gradle.plugin-publish' version '0.9.7'
id 'java-gradle-plugin'
}
group = 'com.lazan'
version = '0.5'
repositories {
mavenCentral()
}
configurations {
jacocoRuntime
}
dependencies {
compile 'org.apache.maven:maven-model:3.5.2'
compile 'org.apache.maven:maven-model-builder:3.5.2'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-all:1.10.19'
testCompile('org.spockframework:spock-core:1.0-groovy-2.4') {
exclude module: 'groovy-all'
}
testRuntime files({project.tasks['createTestkitFiles']})
jacocoRuntime "org.jacoco:org.jacoco.agent:${jacoco.toolVersion}:runtime"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
test {
testLogging {
exceptionFormat = 'full'
showStandardStreams = true
}
beforeTest { TestDescriptor descriptor ->
logger.lifecycle("Running test: $descriptor.name")
}
}
task createTestkitFiles {
def outputDir = file("$buildDir/testkit")
inputs.files sourceSets.main.runtimeClasspath
inputs.files configurations.jacocoRuntime
outputs.dir outputDir
doLast {
String propString = "org.gradle.jvmargs=-javaagent:${configurations.jacocoRuntime.asPath}=destfile=$buildDir/jacoco/test.exec"
mkdir(outputDir)
file("$outputDir/testkit-gradle.properties").text = propString.replace('\\', '/')
}
}
pluginBundle {
website = 'https://github.com/uklance/gradle-dependency-export'
vcsUrl = 'https://github.com/uklance/gradle-dependency-export.git'
description = 'Export maven dependencies from a gradle project to the file system'
tags = ['dependency', 'export', 'maven', 'offline', 'file', 'folder', 'directory']
plugins {
dependencyExport {
id = 'com.lazan.dependency-export'
displayName = 'Dependency Export Plugin'
}
}
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
}