Skip to content

Commit

Permalink
mps-cli-gradle-plugin: Check only unique module files
Browse files Browse the repository at this point in the history
  • Loading branch information
kolmar committed Aug 11, 2023
1 parent 51369f9 commit 0addf80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ConeOfInfluenceComputer {

def modulesUniverse = module2AllUpstreamDependencies.keySet()

List<Path> differentModulesFiles = Filesystem2SSolutionBridge.computeModulesWhichAreModifiedInCurrentBranch(gitRepoLocation, allModifiedFiles)
HashSet<Path> differentModulesFiles = Filesystem2SSolutionBridge.computeModulesWhichAreModifiedInCurrentBranch(gitRepoLocation, allModifiedFiles)

println(">>>>>>>>>>>> All different modules files:")
differentModulesFiles.each { println it }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import static groovy.io.FileType.FILES
class Filesystem2SSolutionBridge {

/** Returns a list of .msd Files representing the modified modules. **/
static List<Path> computeModulesWhichAreModifiedInCurrentBranch(String gitRepoRootLocation, List<String> allModifiedFiles) {
static HashSet<Path> computeModulesWhichAreModifiedInCurrentBranch(String gitRepoRootLocation, List<String> allModifiedFiles) {
def gitRepoLocation = Paths.get(gitRepoRootLocation).toAbsolutePath().normalize()

List<Path> affectedModulesFiles = []
LinkedHashSet<Path> affectedModulesFiles = []
allModifiedFiles.each {
if (it.endsWith('.msd'))
affectedModulesFiles.add(gitRepoLocation.resolve(it))
Expand Down

0 comments on commit 0addf80

Please sign in to comment.