Refactor Gradle script naming and organization
- inline test-mvc and tiles3 .gradle files for clarity - rename merge-dist.gradle to merge-artifacts.gradle - polish Javadoc for merge-artifacts.gradle - move merge-artifacts.gradle into gradle subdirectory - move publish-maven.gradle into gradle subdirectory
This commit is contained in:
@@ -21,6 +21,7 @@ configure(allprojects) {
|
|||||||
ext.hsqldbVersion='1.8.0.10'
|
ext.hsqldbVersion='1.8.0.10'
|
||||||
ext.junitVersion = '4.11.20120805.1225' // temporary use of snapshot; spring-test
|
ext.junitVersion = '4.11.20120805.1225' // temporary use of snapshot; spring-test
|
||||||
// still builds against on 4.10
|
// still builds against on 4.10
|
||||||
|
ext.gradleScriptDir = "${rootProject.projectDir}/gradle"
|
||||||
|
|
||||||
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']
|
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ configure(subprojects - project(":spring-test")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure(subprojects) { subproject ->
|
configure(subprojects) { subproject ->
|
||||||
apply from: "${rootProject.projectDir}/publish-maven.gradle"
|
apply from: "${gradleScriptDir}/publish-maven.gradle"
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest.attributes['Created-By'] =
|
manifest.attributes['Created-By'] =
|
||||||
@@ -505,7 +506,8 @@ project('spring-webmvc') {
|
|||||||
|
|
||||||
project('spring-webmvc-tiles3') {
|
project('spring-webmvc-tiles3') {
|
||||||
description = 'Spring Framework Tiles3 Integration'
|
description = 'Spring Framework Tiles3 Integration'
|
||||||
apply from: 'tiles3.gradle'
|
ext.mergeIntoProject = project(':spring-webmvc')
|
||||||
|
apply from: "${gradleScriptDir}/merge-artifacts.gradle"
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(":spring-context")
|
compile project(":spring-context")
|
||||||
compile project(":spring-webmvc").sourceSets.main.output
|
compile project(":spring-webmvc").sourceSets.main.output
|
||||||
@@ -572,7 +574,8 @@ project('spring-test') {
|
|||||||
|
|
||||||
project('spring-test-mvc') {
|
project('spring-test-mvc') {
|
||||||
description = 'Spring Test MVC Framework'
|
description = 'Spring Test MVC Framework'
|
||||||
apply from: 'test-mvc.gradle'
|
ext.mergeIntoProject = project(':spring-test')
|
||||||
|
apply from: "${gradleScriptDir}/merge-artifacts.gradle"
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(":spring-context")
|
compile project(":spring-context")
|
||||||
compile project(":spring-webmvc")
|
compile project(":spring-webmvc")
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
|
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will merge the distributions of the current project into mergeIntoProject. For
|
* Will merge the artifacts of the current project into mergeIntoProject. For example, to
|
||||||
* example, to bundle spring-test-mvc in spring-test's jars. This script will perform the
|
* bundle spring-test-mvc in spring-test's jars. This script will perform the following
|
||||||
* following steps:
|
* steps:
|
||||||
* <ul>
|
*
|
||||||
* <li>Ensure that jar tasks of the project being merged from will execute the tasks of
|
* - Ensure that jar tasks of the project being merged from will execute the tasks of the
|
||||||
* the project being merged into</li>
|
* project being merged into
|
||||||
* <li>Add the project being merged into to the classpath of the project being merged
|
*
|
||||||
* from</li>
|
* - Add the project being merged into to the classpath of the project being merged from
|
||||||
* <li>Update the pom.xml of the project being merged into to contain the entries from
|
*
|
||||||
* the project being merged from</li>
|
* - Update the pom.xml of the project being merged into to contain the entries from the
|
||||||
* </ul>
|
* project being merged from
|
||||||
*
|
*
|
||||||
* Example Usage:
|
* Example Usage:
|
||||||
*
|
*
|
||||||
* ext.mergeIntoProject = project(':spring-test')
|
* ext.mergeIntoProject = project(':spring-test')
|
||||||
* apply from: "${rootProject.projectDir}/merge-dist.gradle"
|
* apply from: "${rootProject.projectDir}/gradle/merge-artifacts.gradle"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
def mergeFromProject = project
|
def mergeFromProject = project
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
ext.mergeIntoProject = project(':spring-test')
|
|
||||||
apply from: "${rootProject.projectDir}/merge-dist.gradle"
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
ext.mergeIntoProject = project(':spring-webmvc')
|
|
||||||
apply from: "${rootProject.projectDir}/merge-dist.gradle"
|
|
||||||
Reference in New Issue
Block a user