Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8b4cf12851
Fetching contributors…

Cannot retrieve contributors at this time

154 lines (129 sloc) 3.316 kb
configure(allprojects) {
group = 'org.springframework.migrationanalyzer'
ext {
asmVersion='3.1'
commonsCliVersion='1.2'
ejb3Version='1.0.1'
freemarkerVersion='2.3.18'
jacocoVersion='0.6.0.201210061924'
jtaVersion='1.1.1'
junitVersion='4.8.2'
logbackVersion='1.0.0'
mockitoVersion='1.8.5'
slf4jVersion='1.6.4'
springVersion='3.1.2.RELEASE'
}
}
subprojects { project ->
apply plugin: 'eclipse'
if (project.name != 'user-guide') {
apply plugin: 'java'
repositories {
mavenCentral()
}
configurations {
jacoco
}
dependencies {
compile "org.slf4j:slf4j-api:$slf4jVersion"
testCompile "junit:junit:4.8.2"
testCompile "org.mockito:mockito-core:$mockitoVersion"
testCompile "org.slf4j:slf4j-simple:$slf4jVersion"
jacoco "org.jacoco:org.jacoco.agent:$jacocoVersion:runtime"
}
test {
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.migrationanalyzer.*"
}
}
}
ext {
distRoot = "${project.name}-${project.version}"
}
apply plugin: "sonar"
sonar {
server {
if (rootProject.hasProperty('sonarHostUrl')) {
url = rootProject.sonarHostUrl
}
}
database {
if (rootProject.hasProperty('sonarJdbcUrl')) {
url = rootProject.sonarJdbcUrl
}
if (rootProject.hasProperty('sonarJdbcDriver')) {
driverClassName = rootProject.sonarJdbcDriver
}
if (rootProject.hasProperty('sonarJdbcUsername')) {
username = rootProject.sonarJdbcUsername
}
if (rootProject.hasProperty('sonarJdbcPassword')) {
password = rootProject.sonarJdbcPassword
}
}
project {
dynamicAnalysis = 'reuseReports'
withProjectProperties { props ->
props['sonar.core.codeCoveragePlugin'] = 'jacoco'
props['sonar.jacoco.reportPath'] = "${buildDir.name}/jacoco.exec"
}
}
logger.info("Sonar parameters used: server.url='${server.url}'; database.url='${database.url}'; database.driverClassName='${database.driverClassName}'; database.username='${database.username}'")
}
configure(rootProject) {
apply plugin: 'base'
configurations {
lib
}
dependencies {
lib "ch.qos.logback:logback-classic:$logbackVersion"
}
repositories {
mavenCentral()
}
}
task distZip(type: Zip) { zipTask ->
classifier = 'dist'
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(":${zipTask.name}")) {
def projectNames = rootProject.subprojects*.name
def artifacts = new HashSet()
subprojects.each { subproject ->
if (subproject.name != 'user-guide') {
subproject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
def dependency = artifact.moduleVersion.id
if (!projectNames.contains(dependency.name)) {
artifacts << artifact.file
}
}
}
}
configurations.lib.each { artifact ->
artifacts << artifact
}
zipTask.from(artifacts) {
into "${distRoot}/lib"
}
}
}
subprojects.each { subproject ->
if (subproject.name != 'user-guide') {
into ("${distRoot}/dist") {
from subproject.jar
}
}
}
from('src/main/resources') {
into "${distRoot}"
}
}
task docsZip(type: Zip) {
classifier = 'docs'
}
task dist(dependsOn: [distZip, docsZip])
artifacts {
archives distZip
archives docsZip
}
task wrapper(type: Wrapper) {
gradleVersion = '1.2'
}
Jump to Line
Something went wrong with that request. Please try again.