Skip to content

Commit a5e6c30

Browse files
Merge pull request #187 from commercetools/161-gradle-task-exec-order
#161: Explicitly define execution order of gradle tasks.
2 parents 7fbad35 + 78aa890 commit a5e6c30

8 files changed

Lines changed: 59 additions & 16 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [ ] Unit
1515
- [ ] Integration
1616
- [ ] Documentation
17+
- [ ] Add Release Notes entry.
1718
<!-- Two persons should review a PR, don't forget to assign them. -->
1819

1920
#### Hints for Review

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ apply from: "$rootDir/gradle-scripts/findbugs.gradle"
2929
apply from: "$rootDir/gradle-scripts/maven-publish.gradle"
3030
apply from: "$rootDir/gradle-scripts/bintray-publish.gradle"
3131
apply from: "$rootDir/gradle-scripts/oss-publish.gradle"
32-
apply from: "$rootDir/gradle-scripts/javadocs-publish.gradle"
32+
apply from: "$rootDir/gradle-scripts/javadocs-publish.gradle"
33+
apply from: "$rootDir/gradle-scripts/execution-order.gradle"

docs/RELEASE_NOTES.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,23 @@
4040

4141
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
4242
<!--
43-
### v1.0.0-M5 - Nov 7, 2017
43+
### v1.0.0-M5 - Nov 16, 2017
4444
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/v1.0.0-M4...v1.0.0-M5) |
4545
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/v1.0.0-M5/) |
4646
[Jar](https://bintray.com/commercetools/maven/commercetools-sync-java/v1.0.0-M5)
4747
48-
**New Features** (1)
48+
**New Features** (3)
4949
- **Inventory Sync** - Introduced `beforeUpdateCallback` which is applied after generation of update actions and before
5050
actual InventoryEntry update. [#169](https://github.com/commercetools/commercetools-sync-java/issues/169)
51+
- **Build Tools** - Added `Add Release Notes entry` checkbox in PR template on Github repo. [#161](https://github.com/commercetools/commercetools-sync-java/issues/161)
52+
- **Commons** - Appended library name and version to User-Agent headers of JVM SDK clients using the library. [#142](https://github.com/commercetools/commercetools-sync-java/issues/142)
5153
52-
**Enhancements** (1)
54+
**Enhancements** (3)
5355
- **Commons** - `setUpdateActionsCallback` has been renamed to `beforeUpdateCallback` and now takes a TriFunction instead
5456
of Function, which adds more information about the generated list of update actions, namely, the old resource being
5557
updated and the new resource draft. [#169](https://github.com/commercetools/commercetools-sync-java/issues/169)
58+
- **Build Tools** - Explicitly specified gradle tasks execution order in execution-order.gradle. [#161](https://github.com/commercetools/commercetools-sync-java/issues/161)
59+
- **Build Tools** - Set PMD to run before Integration tests. [#161](https://github.com/commercetools/commercetools-sync-java/issues/161)
5660
5761
**Build Tools** (1)
5862
- **Commons** - Appended library name and version to User-Agent headers of JVM SDK clients using the library. [#142](https://github.com/commercetools/commercetools-sync-java/issues/142)
@@ -71,6 +75,7 @@ updated and the new resource draft. [#169](https://github.com/commercetools/comm
7175
to `removeOtherSetEntries`, `removeOtherCollectionEntries` and `removeOtherProperties`. [#169](https://github.com/commercetools/commercetools-sync-java/issues/169)
7276
- **Product Sync** - Renamed `setSyncFilter` to `syncFilter`. [#169](https://github.com/commercetools/commercetools-sync-java/issues/169)
7377
-->
78+
7479
### v1.0.0-M4 - Nov 7, 2017
7580
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/v1.0.0-M3...v1.0.0-M4) |
7681
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/v1.0.0-M4/) |
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* Contains declarations of tasks' execution orders.
3+
*/
4+
5+
/**
6+
* Sub-tasks execution order
7+
*/
8+
//Compile sub-tasks execution order
9+
compileTestJava.mustRunAfter compileJava
10+
compileIntegrationTestJava.mustRunAfter compileTestJava
11+
12+
//Checkstyle sub-tasks execution order
13+
checkstyleTest.mustRunAfter checkstyleMain
14+
checkstyleIntegrationTest.mustRunAfter checkstyleTest
15+
16+
//PMD sub-tasks execution order
17+
pmdTest.mustRunAfter pmdMain
18+
pmdIntegrationTest.mustRunAfter pmdTest
19+
20+
//FindBugs sub-tasks execution order
21+
findbugsTest.mustRunAfter findbugsMain
22+
findbugsIntegrationTest.mustRunAfter findbugsTest
23+
24+
//Jacoco sub-tasks execution order
25+
jacocoTestReport.mustRunAfter jacocoTestCoverageVerification
26+
27+
/**
28+
* Global execution order
29+
*/
30+
31+
// Ensure CheckStyle runs after Compile
32+
checkstyleMain.mustRunAfter compileIntegrationTestJava
33+
// Ensure PMD runs after Checkstyle
34+
pmdMain.mustRunAfter checkstyleIntegrationTest
35+
// Ensure FindBugs runs after PMD
36+
findbugsMain.mustRunAfter pmdIntegrationTest
37+
// Ensure unit tests are run after FindBugs
38+
test.mustRunAfter findbugsIntegrationTest
39+
// Ensure integration tests are run after unit tests and are part of check
40+
check.dependsOn integrationTest
41+
integrationTest.mustRunAfter test
42+
// Ensure jacocoTestCoverageVerification and jacocoTestReport are part of check
43+
check.dependsOn jacocoTestCoverageVerification
44+
check.dependsOn jacocoTestReport
45+
// Ensure jacocoTestCoverageVerification and jacocoTestReport run after integrationTest
46+
jacocoTestCoverageVerification.mustRunAfter integrationTest
47+
jacocoTestReport.mustRunAfter integrationTest

gradle-scripts/findbugs.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ tasks.withType(FindBugs) {
1111
}
1212
}
1313

14-
findbugsTest.mustRunAfter findbugsMain
15-
findbugsIntegrationTest.mustRunAfter findbugsTest
16-

gradle-scripts/integration-tests.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,3 @@ task integrationTest(type: Test) {
1919
outputs.upToDateWhen { false }
2020
}
2121

22-
check.dependsOn integrationTest
23-
integrationTest.mustRunAfter test

gradle-scripts/jacoco.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,4 @@ jacocoTestReport {
2828
html.enabled = false
2929
csv.enabled = false
3030
}
31-
}
32-
33-
check.dependsOn jacocoTestCoverageVerification
34-
test.finalizedBy jacocoTestReport
31+
}

gradle-scripts/pmd.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ tasks.withType(Pmd) {
1515
xml.enabled = false
1616
}
1717
}
18-
19-
pmdTest.mustRunAfter pmdMain
20-
pmdIntegrationTest.mustRunAfter pmdTest

0 commit comments

Comments
 (0)