Closed shawnlinboy closed 5 years ago
But why com.my.library-2.1.7.pom define multiple times the same dependencies? Can you paste the pom.xml? Maybe I could look at which dependency the dependency resolver is staying with.
@oscarcpozas
I've looked up the The com.my:library:2.1.7
pom file, it did not define multiple times the same dependencies explicitly, but its sub-module did.
Here is the pom file:(I've renamed some private info to dummy texts, sorry.)
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.my.library</groupId>
<artifactId>BALABALA</artifactId>
<version>2.1.7</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.my.company.unit</groupId>
<artifactId>weixin-sdk-wrapper</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.picasso</groupId>
<artifactId>picasso</artifactId>
<version>2.5.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.my.company.unit</groupId>
<artifactId>alipay-sdk-wrapper</artifactId>
<version>3.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>25.3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.my.company.unit</groupId>
<artifactId>unionpay-sdk-all-wrapper</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.my.company.unit</groupId>
<artifactId>wxh5-sdk-wrapper</artifactId>
<version>1.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.my.company.unit</groupId>
<artifactId>nowpay-sdk-all-wrapper</artifactId>
<version>1.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.my.company.unit</groupId>
<artifactId>XXThirdPartyChannelInternal</artifactId>
<version>3.0.5</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Actually the hierarchy can be simplified like this:
+---com.my:library:2.1.7
| +--- com.my.a:library:XXX
| | +--- com.balaba.library:okio:1.7
| +--- com.my.b:library:XXX
| | +--- com.balaba.library:okio:1.8
| +--- com.my.c:library:XXX
| | +--- com.my.c1:library:XXX
| | | +--- com.balaba.library:okio:1.9
| +--- com.my.d:library:XXX
| | +--- com.balaba.library:okio:2.0
And in this time, the problem may occur, all of the depencendies from com.balaba.library:okio:1.7
to com.balaba.library:okio:2.0
may be assembled into the final aar.
Sorry for late response, I'm working hard for release 2.0.0 version with new improvements and fixes. Each library in turn defines other dependencies and these are repeating, I note and try to get the correction in this next version.
@oscarcpozas Thx, can't wait for the next release!
Can you check if the issue continues in version 2.0.1? Thx
Solved, thanks for your great work.
What are the steps to reproduce this issue?
What happens?
Modules with same name but different versions were added into the aar
What were you expecting to happen?
The plugin may filter out those duplicated same dependencies, or give an option to choose which version should be maintained
Any logs, error output, etc?
BTW, the plugin really saved my life, thanks for your contribution!