File tree Expand file tree Collapse file tree 3 files changed +25
-24
lines changed
Expand file tree Collapse file tree 3 files changed +25
-24
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ plugins {
33}
44
55apply from : " $rootDir /gradle/java.gradle"
6+ apply from : " $rootDir /dd-smoke-tests/play-common/fix-play-routes.gradle"
67
78def playVer = " 2.8.15"
89def scalaVer = System . getProperty(" scala.version" , /* default = */ " 2.13" )
@@ -66,7 +67,7 @@ dependencies {
6667}
6768
6869configurations. testImplementation {
69- exclude group :' com.typesafe.play' , module :" play-test_$scalaVer "
70+ exclude group : ' com.typesafe.play' , module : " play-test_$scalaVer "
7071}
7172
7273tasks. named(' compileTestGroovy' ). configure {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ plugins {
33}
44
55apply from : " $rootDir /gradle/java.gradle"
6+ apply from : " $rootDir /dd-smoke-tests/play-common/fix-play-routes.gradle"
67
78def playVer = " 2.8.15"
89def scalaVer = System . getProperty(" scala.version" , /* default = */ " 2.13" )
@@ -72,29 +73,6 @@ configurations.testImplementation {
7273 exclude group : ' com.typesafe.play' , module : " play-test_$scalaVer "
7374}
7475
75- // Fix for flaky error: Source directory '/dd-smoke-tests/play-2.8/build/src/play/routes' is not a directory.
76- // Probably, GitLab somehow creates (or restores from cache) file instead of folder.
77- tasks. register(' fixPlayRoutesDirectory' ) {
78- group = ' build cleanup'
79- description = ' Deletes routes path if it is a file instead of directory'
80-
81- def routesPath = layout. buildDirectory. dir(' src/play/routes' )
82- destroyables. register(routesPath)
83-
84- doFirst {
85- def routesPathFile = routesPath. get(). asFile
86-
87- if (routesPathFile. exists() && ! routesPathFile. isDirectory()) {
88- logger. lifecycle(" Removing file that blocks routes directory: ${ routesPathFile} " )
89- project. delete(routesPathFile)
90- }
91- }
92- }
93-
94- tasks. named(' compilePlayRoutes' ) {
95- dependsOn tasks. named(' fixPlayRoutesDirectory' )
96- }
97-
9876tasks. named(' compileTestGroovy' ). configure {
9977 dependsOn ' stageMainDist'
10078 outputs. upToDateWhen {
Original file line number Diff line number Diff line change 1+ // Fix for flaky error: Source directory '/dd-smoke-tests/play-2.8/build/src/play/routes' is not a directory.
2+ // Probably, GitLab somehow creates (or restores from cache) file instead of folder.
3+ tasks. register(' fixPlayRoutesDirectory' ) {
4+ group = ' build cleanup'
5+ description = ' Deletes routes path if it is a file instead of directory'
6+
7+ def routesPath = layout. buildDirectory. dir(' src/play/routes' )
8+ destroyables. register(routesPath)
9+
10+ doFirst {
11+ def routesPathFile = routesPath. get(). asFile
12+
13+ if (routesPathFile. exists() && ! routesPathFile. isDirectory()) {
14+ logger. lifecycle(" Removing file that blocks routes directory: ${ routesPathFile} " )
15+ project. delete(routesPathFile)
16+ }
17+ }
18+ }
19+
20+ tasks. named(' processResources' ) {
21+ dependsOn tasks. named(' fixPlayRoutesDirectory' )
22+ }
You can’t perform that action at this time.
0 commit comments