Skip to content

Commit

Permalink
GEODE-5555: Add 'devBuild' task (apache#2293)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Patrick Rhomberg <[email protected]>
  • Loading branch information
2 people authored and jake-at-work committed Aug 10, 2018
1 parent 25deeee commit e73ef5a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 20 deletions.
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
}
}
}
27 changes: 10 additions & 17 deletions geode-web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand All @@ -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")
Expand All @@ -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'
Expand Down
7 changes: 7 additions & 0 deletions gradle/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
}
}
4 changes: 2 additions & 2 deletions gradle/test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e73ef5a

Please sign in to comment.