Parcourir la source

Fix the dependency-switheroo script.

Excluding 'com.dmdirc:util' nuked the project as well. That wasn't
good. Instead, just call remove on the DependencySet. That seems
to work and is a lot simpler.
pull/9/head
Chris Smith il y a 9 ans
Parent
révision
c7b64d57d8
1 fichiers modifiés avec 4 ajouts et 5 suppressions
  1. 4
    5
      local-dependency-change.gradle

+ 4
- 5
local-dependency-change.gradle Voir le fichier

@@ -6,19 +6,18 @@ gradle.projectsEvaluated {
6 6
         def replace = []
7 7
 
8 8
         p.configurations.each { conf ->
9
+            def remove = []
9 10
             conf.dependencies.each { dep ->
10 11
                 if (dep.group == 'com.dmdirc' && dep.version == '+' && projectMap[dep.name] != null) {
12
+                    remove += dep
11 13
                     replace += [conf: conf.name, dep: dep]
12 14
                 }
13 15
             }
16
+
17
+            conf.dependencies.removeAll(remove)
14 18
         }
15 19
 
16 20
         replace.each { rep ->
17
-            logger.info("Replacing ${p.name}'s dependency on $rep.dep.name with project reference")
18
-            p.configurations.all*.exclude(group: 'com.dmdirc', module: rep.dep.name)
19
-            rep.dep.properties.excludeRules.each { ex ->
20
-                p.configurations.all*.exclude(group: ex.group, module: ex.module)
21
-            }
22 21
             p.dependencies.add(rep.conf, projectMap[rep.dep.name])
23 22
         }
24 23
     }

Chargement…
Annuler
Enregistrer