Browse 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 9 years ago
parent
commit
c7b64d57d8
1 changed files with 4 additions and 5 deletions
  1. 4
    5
      local-dependency-change.gradle

+ 4
- 5
local-dependency-change.gradle View File

6
         def replace = []
6
         def replace = []
7
 
7
 
8
         p.configurations.each { conf ->
8
         p.configurations.each { conf ->
9
+            def remove = []
9
             conf.dependencies.each { dep ->
10
             conf.dependencies.each { dep ->
10
                 if (dep.group == 'com.dmdirc' && dep.version == '+' && projectMap[dep.name] != null) {
11
                 if (dep.group == 'com.dmdirc' && dep.version == '+' && projectMap[dep.name] != null) {
12
+                    remove += dep
11
                     replace += [conf: conf.name, dep: dep]
13
                     replace += [conf: conf.name, dep: dep]
12
                 }
14
                 }
13
             }
15
             }
16
+
17
+            conf.dependencies.removeAll(remove)
14
         }
18
         }
15
 
19
 
16
         replace.each { rep ->
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
             p.dependencies.add(rep.conf, projectMap[rep.dep.name])
21
             p.dependencies.add(rep.conf, projectMap[rep.dep.name])
23
         }
22
         }
24
     }
23
     }

Loading…
Cancel
Save