-
-
Save Draww/59c8a8d2ae7ceb34993b7794935b945a to your computer and use it in GitHub Desktop.
Add this Maven shader plugin in the Unirest-java pom.xml to work around dependency errors when using Unirest in your Android projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<version>2.2</version> | |
<executions> | |
<execution> | |
<phase>package</phase> | |
<goals> | |
<goal>shade</goal> | |
</goals> | |
<configuration> | |
<finalName>${project.artifactId}-${project.version}-withDependency-ShadedForAndroid</finalName> | |
<artifactSet> | |
<includes> | |
<include>com.mashape.unirest:unirest-java</include> | |
<include>org.apache.httpcomponents:httpclient</include> | |
<include>org.apache.httpcomponents:httpcore</include> | |
<include>org.apache.httpcomponents:httpcore-nio</include> | |
<include>org.apache.httpcomponents:httpasyncclient</include> | |
<include>org.apache.httpcomponents:httpmime</include> | |
<include>org.json:json</include> | |
<include>commons-logging:commons-logging</include> | |
<include>commons-codec:commons-codec</include> | |
</includes> | |
</artifactSet> | |
<relocations> | |
<relocation> | |
<pattern>org.apache.http</pattern> | |
<shadedPattern>com.mashape.relocation</shadedPattern> | |
</relocation> | |
</relocations> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment