File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,30 @@ dependencies {
69
69
}
70
70
71
71
configurations. testImplementation {
72
- exclude group :' com.typesafe.play' , module :" play-test_$scalaVer "
72
+ exclude group : ' com.typesafe.play' , module : " play-test_$scalaVer "
73
+ }
74
+
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' )
73
96
}
74
97
75
98
tasks. named(' compileTestGroovy' ). configure {
You can’t perform that action at this time.
0 commit comments