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 {
3
3
}
4
4
5
5
apply from : " $rootDir /gradle/java.gradle"
6
+ apply from : " $rootDir /dd-smoke-tests/play-common/fix-play-routes.gradle"
6
7
7
8
def playVer = " 2.8.15"
8
9
def scalaVer = System . getProperty(" scala.version" , /* default = */ " 2.13" )
@@ -66,7 +67,7 @@ dependencies {
66
67
}
67
68
68
69
configurations. testImplementation {
69
- exclude group :' com.typesafe.play' , module :" play-test_$scalaVer "
70
+ exclude group : ' com.typesafe.play' , module : " play-test_$scalaVer "
70
71
}
71
72
72
73
tasks. named(' compileTestGroovy' ). configure {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ plugins {
3
3
}
4
4
5
5
apply from : " $rootDir /gradle/java.gradle"
6
+ apply from : " $rootDir /dd-smoke-tests/play-common/fix-play-routes.gradle"
6
7
7
8
def playVer = " 2.8.15"
8
9
def scalaVer = System . getProperty(" scala.version" , /* default = */ " 2.13" )
@@ -72,29 +73,6 @@ configurations.testImplementation {
72
73
exclude group : ' com.typesafe.play' , module : " play-test_$scalaVer "
73
74
}
74
75
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
-
98
76
tasks. named(' compileTestGroovy' ). configure {
99
77
dependsOn ' stageMainDist'
100
78
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