how to use different denpendency in one project with maven?(android) -


i use maven package app. want integrate leakcanary in debug version. need add <dependency> node pom.xml. want remove release version. how can that? have solution pom.xml debug version , pom release version. solution use shell modify pom.xml before package. better idea?

maven:3.3.9
com.simpligility.maven.plugins:android-maven-plugin:4.4.3

you can maven profiles; can host several pom elements: property values, configurations, dependencies, etc.
enable 1 of more of these profiles -p when running command line, or e.g. in eclipse, specific entry in run as... window.

here's brief example:

    <!-- dependencies declarations --> </dependencies>  <profiles>     <profile>         <id>extralib</id>         <properties>             <!-- specify property values here -->         </properties>          <dependencies>         <dependency>             <!-- add dependency decl here -->         <dependency>         </dependencies>     </profile>  <!-- may have several profiles --> 

all of childs of <profile> optional.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -