You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2018/08/10 16:54:12 UTC
[geode] branch develop updated: GEODE-5555: Add 'devBuild' task
(#2293)
This is an automated email from the ASF dual-hosted git repository.
jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new e73ef5a GEODE-5555: Add 'devBuild' task (#2293)
e73ef5a is described below
commit e73ef5a2a0112255ccaa3acf949a1c4fc9548bc6
Author: Robert Houghton <rh...@pivotal.io>
AuthorDate: Fri Aug 10 09:54:08 2018 -0700
GEODE-5555: Add 'devBuild' task (#2293)
* devBuild depends on :assembly and :spotlessApply
* Ensure that spotlessApply and spotlessCheck run before compilation
*** This ordering dependency is project wide, not only with respect to
devBuild
* Correct apparent error in precheckin task only running
acceptanceTest task in geode-assembly module
*** Historically, this was the only module that contained
acceptanceTests. This was changed with the introduction of nebula
facets.
* Minor readability improvements in touched files.
Co-authored-by: Robert Houghton <rh...@pivotal.io>
Co-authored-by: Patrick Rhomberg <pr...@pivotal.io>
---
build.gradle | 12 +++++++++++-
geode-web/build.gradle | 27 ++++++++++-----------------
gradle/spotless.gradle | 7 +++++++
gradle/test.gradle | 4 ++--
4 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/build.gradle b/build.gradle
index a111eac..243b252 100755
--- a/build.gradle
+++ b/build.gradle
@@ -53,7 +53,7 @@ allprojects {
version = versionNumber + releaseQualifier + releaseType
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
- // We want to see all test results. This is equivalatent to setting --continue
+ // We want to see all test results. This is equivalent to setting --continue
// on the command line.
gradle.startParameter.continueOnFailure = true
@@ -102,3 +102,13 @@ subprojects {
apply plugin: 'com.github.ben-manes.versions'
}
+
+task devBuild(dependsOn: [":assemble"]) {
+ description "A convenience target for a typical developer workflow: apply spotless and assemble all classes."
+ // spotless targets are not available until after evaluation.
+ subprojects {
+ afterEvaluate {
+ this.devBuild.dependsOn(project.spotlessApply)
+ }
+ }
+}
diff --git a/geode-web/build.gradle b/geode-web/build.gradle
index 7c51caa..5f3790b 100755
--- a/geode-web/build.gradle
+++ b/geode-web/build.gradle
@@ -18,28 +18,28 @@
apply plugin: 'war'
dependencies {
- runtime ('org.springframework:spring-aspects:' + project.'springframework.version') {
+ runtime('org.springframework:spring-aspects:' + project.'springframework.version') {
exclude module: 'aspectjweaver'
exclude module: 'aopalliance'
exclude module: 'spring-core'
}
- runtime ('org.springframework:spring-oxm:' + project.'springframework.version') {
+ runtime('org.springframework:spring-oxm:' + project.'springframework.version') {
exclude module: 'commons-logging'
exclude module: 'spring-beans'
exclude module: 'spring-core'
}
- runtime ('org.springframework:spring-webmvc:' + project.'springframework.version') {
+ runtime('org.springframework:spring-webmvc:' + project.'springframework.version') {
exclude module: 'aopalliance'
exclude module: 'aspectjweaver'
exclude module: 'spring-core'
}
- runtime ('commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version') {
+ runtime('commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version') {
exclude module: 'commons-io'
}
testCompile 'org.springframework:spring-test:' + project.'springframework.version'
- testCompile ('org.springframework:spring-webmvc:' + project.'springframework.version') {
+ testCompile('org.springframework:spring-webmvc:' + project.'springframework.version') {
exclude module: 'aopalliance'
exclude module: 'spring-aop'
}
@@ -63,11 +63,9 @@ dependencies {
testCompile files(project(':geode-old-versions').sourceSets.main.output)
integrationTestCompile project(":geode-dunit")
- // TODO remove dependency on sources from other test modules
integrationTestCompile files(project(':geode-core').sourceSets.integrationTest.output)
distributedTestCompile project(":geode-dunit")
- // TODO remove dependency on sources from other test modules
distributedTestCompile files(project(':geode-core').sourceSets.distributedTest.output)
upgradeTestCompile project(":geode-dunit")
@@ -78,18 +76,13 @@ dependencies {
//minusConfigurations does not work here, because it removes the entire
//geode-core project
eclipse.classpath.file {
- whenMerged { classpath ->
- classpath.entries.removeAll { entry -> entry.path.contains('geode-core/build')}
- }
-}
-
-distributedTest {
- dependsOn war
+ whenMerged { classpath ->
+ classpath.entries.removeAll { entry -> entry.path.contains('geode-core/build') }
+ }
}
-integrationTest {
- dependsOn war
-}
+distributedTest.dependsOn(war)
+integrationTest.dependsOn(war)
war {
dependsOn ':geode-core:webJar'
diff --git a/gradle/spotless.gradle b/gradle/spotless.gradle
index 0aa8561..a49255e 100644
--- a/gradle/spotless.gradle
+++ b/gradle/spotless.gradle
@@ -23,6 +23,7 @@ subprojects {
target project.fileTree(project.projectDir) {
include '**/*.java'
exclude '**/generated-src/**'
+ exclude '**/build/**'
}
// As the method name suggests, bump this number if any of the below "custom" rules change.
@@ -100,4 +101,10 @@ subprojects {
endWithNewline()
}
}
+
+ // If we add more languages to Spotless, add them to 'compileXYZ' trigger below
+ afterEvaluate {
+ project.tasks['compileJava'].mustRunAfter(spotlessCheck)
+ project.tasks['compileJava'].mustRunAfter(spotlessApply)
+ }
}
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 27caa89..378ea6a 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -311,8 +311,8 @@ subprojects {
})
// Make precheckin task run all validation tests for checking in code.
- task precheckin (dependsOn: [ build, ":geode-assembly:acceptanceTest", integrationTest, distributedTest, flakyTest ]) {
- description 'Run this task before checking in code to validate changes. This task combines the following tasks: build, integrationTest, distributedTest, and flakyTest'
+ task precheckin (dependsOn: [ build, acceptanceTest, integrationTest, distributedTest, upgradeTest ]) {
+ description 'Run this task before checking in code to validate changes. It runs tests beyond unitTest'
}
combineReports.mustRunAfter check, test, integrationTest, distributedTest, flakyTest, acceptanceTest, repeatTest, upgradeTest