Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Can I exclude a dependent plugin from being added to my build?

Discussion in 'Android' started by karyll, Mar 26, 2021.

  1. karyll

    karyll

    Joined:
    Apr 4, 2017
    Posts:
    46
    Hi,
    I'm using admob to display ads in my app and I'm trying to add mediation.
    admob can be added with either the full package or a lite version
    https://developers.google.com/admob/android/lite-sdk

    I am using the lite sdk
    upload_2021-3-26_21-29-9.png

    The UnityMediationDependencies.xml which comes with the unity mediation plugin, because of dependent plugins, is adding the full play-servies-ads package to my build.
    upload_2021-3-26_21-31-4.png
    this *.pom file I got from the repository link https://google.bintray.com/mobile-ads-adapters-android/com/google/ads/mediation/unity/3.6.0.0/ which shows (i think) what gets included automatically with the above xml definition
    upload_2021-3-26_21-31-41.png

    What I want to achieve is have in my project the ads.mediation, unity3d.ads and androidx.annotation packages but NOT the com.google.android.gms-play-services-ads package.

    Is there any way to write some code in the UnityMediationDependencies.xml that removes the play-services-ads package from the build?

    I've read about exclusions https://maven.apache.org/pom.html#exclusions but I do not know how to apply them or even if it's possible to.
    Thanks,
    - Victor