File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ if (rootProject.hasProperty("gitBaseRef")) {
123123
124124 // Get all projects, sorted by descending path length.
125125 final projects = subprojects. sort { a , b -> b. projectDir. path. length() <=> a. projectDir. path. length() }
126+ Map<Project , Set<String > > _affectedProjects = [:]
126127 for (File f in rootProject. changedFiles) {
127128 Project p = projects. find { f. toString(). startsWith(it. projectDir. path + " /" ) }
128129 if (p == null ) {
@@ -132,7 +133,6 @@ if (rootProject.hasProperty("gitBaseRef")) {
132133 }
133134 final relPath = Paths . get(p. projectDir. path). relativize(f. toPath())
134135 final pathComponents = relPath. collect({ it. toString() }). toList()
135- Map<Project , Set<String > > _affectedProjects = [:]
136136 if (pathComponents. size() < 3 ) {
137137 logger. warn(" Changed file: ${ relativeToGitRoot(f)} in project ${ p.path} (all)" )
138138 _affectedProjects. computeIfAbsent(p, { new HashSet<String > () }). add(" all" )
@@ -149,9 +149,9 @@ if (rootProject.hasProperty("gitBaseRef")) {
149149 logger. warn(" Changed file: ${ relativeToGitRoot(f)} in project ${ p.path} (all)" )
150150 _affectedProjects. computeIfAbsent(p, { new HashSet<String > () }). add(" all" )
151151 }
152- rootProject . ext {
153- it . affectedProjects = _affectedProjects
154- }
152+ }
153+ rootProject . ext {
154+ it . affectedProjects = _affectedProjects
155155 }
156156 }
157157
You can’t perform that action at this time.
0 commit comments