From 527b804dadc0c55da5193f5ac986c7fa3bc32fbd Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Tue, 8 Feb 2011 13:13:04 +0200 Subject: [PATCH] + adjust settings accordingly to spring-gradle-build --- build.gradle | 52 +++++++++++++++++++++++++++++++++++++++-------- gradle.properties | 17 +++++++++++++++- 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 0f2be3eab..2e9001628 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,39 @@ +import org.springframework.build.Version + // used for artifact names, building doc upload urls, etc. description = 'Spring Data Key Value' abbreviation = 'DATAKV' -apply plugin: "eclipse" -apply plugin: "idea" -apply from: "$rootDir/gradle/docbook.gradle" +apply plugin: 'base' +apply plugin: 'eclipse' +apply plugin: 'idea' + +def buildSrcDir = "$rootDir/buildSrc" +apply from: "$buildSrcDir/wrapper.gradle" +apply from: "$buildSrcDir/maven-root-pom.gradle" + assemble.dependsOn generatePom +allprojects { + // group will translate to groupId during pom generation and deployment + group = 'org.springframework.data.keyvalue' + + // version will be used in maven pom generation as well as determining + // where artifacts should be deployed, based on release type of snapshot, + // milestone or release. + // @see org.springframework.build.Version under buildSrc/ for more info + // @see gradle.properties for the declaration of this property. + version = new Version(springDataKeyValueVersion) +} + subprojects { apply plugin: "java" apply plugin: "maven" + apply plugin: 'eclipse' // `gradle eclipse` to generate .classpath/.project + apply plugin: 'idea' // `gradle idea` to generate .ipr/.iml + apply plugin: 'bundlor' // all core projects should be OSGi-compliant + releaseType = "M2" version = "1.0.0.$releaseType" @@ -24,16 +47,19 @@ subprojects { project.checkForProps = { Map args -> requiredPropSets.add args } - // TODO: Finish integrating this stuff with our build - //apply from: "$rootDir/gradle/maven-deployment.gradle" - //apply from: "$rootDir/gradle/dist.gradle" + // add tasks for creating source jars and generating poms etc + apply from: "$buildSrcDir/maven-deployment.gradle" + + // add tasks for finding and publishing .xsd files + apply from: "$buildSrcDir/schema-publication.gradle" + repositories { // Read user's local Maven repo first mavenRepo name: "mavenLocal", urls: new File(System.getProperty("user.home"), ".m2/repository").toURL().toString() // Public Spring artefacts + mavenRepo name: "springsource-org-release", urls: "http://repository.springsource.com/maven/bundles/release" mavenRepo name: "spring-release", urls: "http://maven.springframework.org/release" - mavenRepo name: "springsource-org-release", urls: "http://repository.springsource.com/maven/bundles/release" mavenRepo name: "spring-milestone", urls: "http://maven.springframework.org/milestone" mavenRepo name: "spring-snapshot", urls: "http://maven.springframework.org/snapshot" // Additional community artefacts @@ -82,4 +108,14 @@ ideaProject { withXml { provider -> provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git' } -} \ No newline at end of file +} + +// ----------------------------------------------------------------------------- +// Configuration for the docs subproject +// ----------------------------------------------------------------------------- +project('docs') { + apply from: "$buildSrcDir/docs.gradle" +} + +apply from: "$buildSrcDir/dist.gradle" +apply from: "$buildSrcDir/checks.gradle" \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 73b87aecc..9217f08a4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,5 @@ +## Dependecies Version + # Logging log4jVersion = 1.2.16 slf4jVersion = 1.6.1 @@ -8,4 +10,17 @@ jacksonVersion = 1.6.4 # Testing junitVersion = 4.8.1 -mockitoVersion = 1.8.5 \ No newline at end of file +mockitoVersion = 1.8.5 + + +# ------------------------------------------------------------------------------ +# version to be applied to all projects in this multi-project build. this is +# the one and only location version changes need to be made. +# ------------------------------------------------------------------------------ +springDataKeyValueVersion=1.0.0.M2-BUILD-SNAPSHOT + +# ------------------------------------------------------------------------------ +# build system user roles +# role may be either 'developer' or 'buildmaster' +# ------------------------------------------------------------------------------ +role=developer