/
build.gradle
executable file
·88 lines (72 loc) · 2.59 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "pl.allegro.tech.build:axion-release-plugin:1.3.4"
classpath "com.bmuschko:gradle-nexus-plugin:2.3"
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
}
}
apply plugin: 'io.codearte.nexus-staging'
nexusStaging {
packageGroup = "com.toomuchcoding"
}
apply plugin: "pl.allegro.tech.build.axion-release"
scmVersion {
tag { prefix = "xmlassert" }
createReleaseCommit = true
releaseCommitMessage { version, position -> "Release version: ${version}\n\n[ci skip]" }
hooks {
pre "fileUpdate", [file : "README.adoc",
pattern : { v, p -> /:lib_version:.*/ },
replacement: { v, p -> ":lib_version: $v" }]
}
}
subprojects {
group = 'com.toomuchcoding.xmlassert'
project.version = scmVersion.version
description = "XML assertion library"
repositories {
jcenter()
}
apply plugin: 'groovy'
sourceCompatibility = 1.7
dependencies {
compile 'com.rackspace.eclipse.webtools.sourceediting:org.eclipse.wst.xml.xpath2.processor:2.1.100'
compile 'xerces:xercesImpl:2.11.0'
compile "ch.qos.logback:logback-classic:1.1.2"
testCompile "org.codehaus.groovy:groovy-all:2.4.5"
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
testCompile 'cglib:cglib-nodep:3.1'
testCompile 'org.objenesis:objenesis:2.1'
}
test {
maxParallelForks = Runtime.runtime.availableProcessors() / 2
}
}
configure(subprojects) {
apply plugin: 'maven'
apply plugin: 'maven-publish'
publishing {
publications {
code(MavenPublication) {
from components.java
pom.withXml {
//#89 - workaround to not to have only runtime dependencies in generated pom.xml
//Known limitation in maven-publish - - http://forums.gradle.org/gradle/topics/maven_publish_plugin_generated_pom_making_dependency_scope_runtime#reply_14120711
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
}
}
}
}
if (!version.contains('SNAPSHOT')) {
apply from: "$rootDir/gradle/release.gradle"
}
}