Skip to content

Commit e73ef5a

Browse files
robbadlerPurelyApplied
authored andcommitted
GEODE-5555: Add 'devBuild' task (apache#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 <[email protected]> Co-authored-by: Patrick Rhomberg <[email protected]>
1 parent 25deeee commit e73ef5a

File tree

4 files changed

+30
-20
lines changed

4 files changed

+30
-20
lines changed

build.gradle

+11-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ allprojects {
5353
version = versionNumber + releaseQualifier + releaseType
5454
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
5555

56-
// We want to see all test results. This is equivalatent to setting --continue
56+
// We want to see all test results. This is equivalent to setting --continue
5757
// on the command line.
5858
gradle.startParameter.continueOnFailure = true
5959

@@ -102,3 +102,13 @@ subprojects {
102102

103103
apply plugin: 'com.github.ben-manes.versions'
104104
}
105+
106+
task devBuild(dependsOn: [":assemble"]) {
107+
description "A convenience target for a typical developer workflow: apply spotless and assemble all classes."
108+
// spotless targets are not available until after evaluation.
109+
subprojects {
110+
afterEvaluate {
111+
this.devBuild.dependsOn(project.spotlessApply)
112+
}
113+
}
114+
}

geode-web/build.gradle

+10-17
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@
1818
apply plugin: 'war'
1919

2020
dependencies {
21-
runtime ('org.springframework:spring-aspects:' + project.'springframework.version') {
21+
runtime('org.springframework:spring-aspects:' + project.'springframework.version') {
2222
exclude module: 'aspectjweaver'
2323
exclude module: 'aopalliance'
2424
exclude module: 'spring-core'
2525
}
26-
runtime ('org.springframework:spring-oxm:' + project.'springframework.version') {
26+
runtime('org.springframework:spring-oxm:' + project.'springframework.version') {
2727
exclude module: 'commons-logging'
2828
exclude module: 'spring-beans'
2929
exclude module: 'spring-core'
3030
}
31-
runtime ('org.springframework:spring-webmvc:' + project.'springframework.version') {
31+
runtime('org.springframework:spring-webmvc:' + project.'springframework.version') {
3232
exclude module: 'aopalliance'
3333
exclude module: 'aspectjweaver'
3434
exclude module: 'spring-core'
3535
}
36-
runtime ('commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version') {
36+
runtime('commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version') {
3737
exclude module: 'commons-io'
3838
}
3939

4040
testCompile 'org.springframework:spring-test:' + project.'springframework.version'
4141

42-
testCompile ('org.springframework:spring-webmvc:' + project.'springframework.version') {
42+
testCompile('org.springframework:spring-webmvc:' + project.'springframework.version') {
4343
exclude module: 'aopalliance'
4444
exclude module: 'spring-aop'
4545
}
@@ -63,11 +63,9 @@ dependencies {
6363
testCompile files(project(':geode-old-versions').sourceSets.main.output)
6464

6565
integrationTestCompile project(":geode-dunit")
66-
// TODO remove dependency on sources from other test modules
6766
integrationTestCompile files(project(':geode-core').sourceSets.integrationTest.output)
6867

6968
distributedTestCompile project(":geode-dunit")
70-
// TODO remove dependency on sources from other test modules
7169
distributedTestCompile files(project(':geode-core').sourceSets.distributedTest.output)
7270

7371
upgradeTestCompile project(":geode-dunit")
@@ -78,18 +76,13 @@ dependencies {
7876
//minusConfigurations does not work here, because it removes the entire
7977
//geode-core project
8078
eclipse.classpath.file {
81-
whenMerged { classpath ->
82-
classpath.entries.removeAll { entry -> entry.path.contains('geode-core/build')}
83-
}
84-
}
85-
86-
distributedTest {
87-
dependsOn war
79+
whenMerged { classpath ->
80+
classpath.entries.removeAll { entry -> entry.path.contains('geode-core/build') }
81+
}
8882
}
8983

90-
integrationTest {
91-
dependsOn war
92-
}
84+
distributedTest.dependsOn(war)
85+
integrationTest.dependsOn(war)
9386

9487
war {
9588
dependsOn ':geode-core:webJar'

gradle/spotless.gradle

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ subprojects {
2323
target project.fileTree(project.projectDir) {
2424
include '**/*.java'
2525
exclude '**/generated-src/**'
26+
exclude '**/build/**'
2627
}
2728

2829
// As the method name suggests, bump this number if any of the below "custom" rules change.
@@ -100,4 +101,10 @@ subprojects {
100101
endWithNewline()
101102
}
102103
}
104+
105+
// If we add more languages to Spotless, add them to 'compileXYZ' trigger below
106+
afterEvaluate {
107+
project.tasks['compileJava'].mustRunAfter(spotlessCheck)
108+
project.tasks['compileJava'].mustRunAfter(spotlessApply)
109+
}
103110
}

gradle/test.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ subprojects {
311311
})
312312

313313
// Make precheckin task run all validation tests for checking in code.
314-
task precheckin (dependsOn: [ build, ":geode-assembly:acceptanceTest", integrationTest, distributedTest, flakyTest ]) {
315-
description 'Run this task before checking in code to validate changes. This task combines the following tasks: build, integrationTest, distributedTest, and flakyTest'
314+
task precheckin (dependsOn: [ build, acceptanceTest, integrationTest, distributedTest, upgradeTest ]) {
315+
description 'Run this task before checking in code to validate changes. It runs tests beyond unitTest'
316316
}
317317

318318
combineReports.mustRunAfter check, test, integrationTest, distributedTest, flakyTest, acceptanceTest, repeatTest, upgradeTest

0 commit comments

Comments
 (0)