diff --git a/build.gradle b/build.gradle
index b8ca8f2a71dc..cc5eb03d626e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,7 +4,7 @@ buildscript {
 	}
 	dependencies {
 		classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
-		classpath("org.springframework.build.gradle:docbook-reference-plugin:0.2.8")
+		classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
 	}
 }
 
@@ -1050,7 +1050,7 @@ configure(rootProject) {
 
 	task wrapper(type: Wrapper) {
 		description = "Generates gradlew[.bat] scripts"
-		gradleVersion = "1.12"
+		gradleVersion = "2.5"
 
 		doLast() {
 			def gradleOpts = "-XX:MaxPermSize=1024m -Xmx1024m"
diff --git a/buildSrc/src/main/groovy/org/springframework/build/gradle/MergePlugin.groovy b/buildSrc/src/main/groovy/org/springframework/build/gradle/MergePlugin.groovy
index b2807d164e6d..40bbce02829c 100644
--- a/buildSrc/src/main/groovy/org/springframework/build/gradle/MergePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/springframework/build/gradle/MergePlugin.groovy
@@ -68,8 +68,8 @@ class MergePlugin implements Plugin<Project> {
 		Configuration runtimeMerge = project.configurations.create("runtimeMerge")
 
 		// Ensure the IDE can reference merged projects
-		project.eclipse.classpath.plusConfigurations += [runtimeMerge]
-		project.idea.module.scopes.PROVIDED.plus += runtimeMerge
+		project.eclipse.classpath.plusConfigurations += [ runtimeMerge ]
+		project.idea.module.scopes.PROVIDED.plus += [ runtimeMerge ]
 
 		// Hook to perform the actual merge logic
 		project.afterEvaluate{
@@ -132,8 +132,9 @@ class MergePlugin implements Plugin<Project> {
 						intoConfiguration.dependencies.add(it)
 					}
 				}
+				def index = project.parent.childProjects.findIndexOf {p -> p.getValue() == project}
 				project.merge.into.install.repositories.mavenInstaller.pom.scopeMappings.addMapping(
-					mapping.priority + 100, intoConfiguration, mapping.scope)
+					mapping.priority + 100 + index, intoConfiguration, mapping.scope)
 			}
 		}
 	}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 7dab6dc93c77..cdab2f66f1b9 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-bin.zip