133 lines
3.2 KiB
Groovy
133 lines
3.2 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath "pl.allegro.tech.build:axion-release-plugin:1.2.2"
|
|
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.1"
|
|
}
|
|
}
|
|
|
|
apply plugin: "pl.allegro.tech.build.axion-release"
|
|
apply plugin: 'io.codearte.nexus-staging'
|
|
|
|
nexusStaging {
|
|
packageGroup = "io.codearte"
|
|
stagingProfileId = '93c08fdebde1ff'
|
|
}
|
|
|
|
scmVersion {
|
|
tag { prefix = "accurest" }
|
|
createReleaseCommit = true
|
|
releaseCommitMessage { version, position -> "Release version: ${version}\n\n[ci skip]" }
|
|
hooks {
|
|
pre "fileUpdate", [file : "README.md",
|
|
pattern : { v, p -> /'io\.codearte\.accurest:accurest-gradle-plugin:.*'/ },
|
|
replacement: { v, p -> "'io.codearte.accurest:accurest-gradle-plugin:$v'" }]
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
project.version = scmVersion.version
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'groovy'
|
|
apply plugin: 'maven-publish'
|
|
|
|
if (!version.contains('SNAPSHOT')) {
|
|
apply from: "$rootDir/gradle/release.gradle"
|
|
}
|
|
|
|
group = 'io.codearte.accurest'
|
|
|
|
sourceCompatibility = 1.7
|
|
targetCompatibility = 1.7
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
}
|
|
|
|
//Dependencies in all subprojects - http://solidsoft.wordpress.com/2014/11/13/gradle-tricks-display-dependencies-for-all-subprojects-in-multi-project-build/
|
|
task allDeps(type: DependencyReportTask) {}
|
|
task allInsight(type: DependencyInsightReportTask) {}
|
|
|
|
dependencies {
|
|
compile localGroovy()
|
|
testCompile('org.spockframework:spock-core:0.7-groovy-2.0') {
|
|
exclude(group: 'org.codehaus.groovy')
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
maven(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'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
uploadArchives.dependsOn { check }
|
|
}
|
|
|
|
project(':accurest-core') {
|
|
dependencies {
|
|
compile 'org.slf4j:slf4j-api:[1.6.0,)'
|
|
compile 'org.codehaus.plexus:plexus-utils:3.0.21'
|
|
compile 'commons-io:commons-io:2.4'
|
|
testCompile 'cglib:cglib-nodep:2.2'
|
|
testCompile 'org.objenesis:objenesis:2.1'
|
|
testCompile 'com.github.tomakehurst:wiremock:1.53'
|
|
}
|
|
}
|
|
|
|
project(':accurest-converters') {
|
|
dependencies {
|
|
compile project(':accurest-core')
|
|
compile 'org.apache.commons:commons-lang3:3.3.2'
|
|
compile 'commons-io:commons-io:[2.4,)'
|
|
testCompile 'com.github.tomakehurst:wiremock:1.53'
|
|
}
|
|
}
|
|
|
|
project(':accurest-gradle-plugin') {
|
|
dependencies {
|
|
compile project(':accurest-core')
|
|
compile project(':accurest-converters')
|
|
compile gradleApi()
|
|
|
|
testCompile('com.netflix.nebula:nebula-test:2.2.0') {
|
|
exclude(group: 'org.spockframework')
|
|
}
|
|
}
|
|
|
|
test {
|
|
exclude '**/*FunctionalSpec.*'
|
|
}
|
|
task funcTest(type: Test) {
|
|
include '**/*FunctionalSpec.*'
|
|
|
|
reports.html {
|
|
destination = file("${reporting.baseDir}/funcTests")
|
|
}
|
|
}
|
|
|
|
uploadArchives.dependsOn { funcTest }
|
|
}
|
|
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion = '2.2.1'
|
|
}
|