There seems to be some form of manifest merging control in the merge tool that support tools:merge="override|remove".
To use, declare the header of your manifest as follows: <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> Then, use one of the following appropriate attributes on any activity, activity-alias, service, receiver, or provider element that you want to merge: tools:merge="override" tools:merge="remove" This info was gleaned from: https://android.googlesource.com/platform/tools/base/+/idea133/build-system/manifest-merger/src/main/java/com/android/manifmerger/ManifestMerger.java Pv On Monday, January 27, 2014 10:55:02 AM UTC-8, Xavier Ducrohet wrote: > > Something like that. I think we'd have to make lint able to detect that > you are using a library project with a higher minSdkVersion and have it > output warning. > > > On Mon, Jan 27, 2014 at 10:31 AM, Malachi de AElfweald < > [email protected] <javascript:>> wrote: > >> That'd be interesting. I guess you would want to put some SDK.VERSION >> checks around calls to that library? >> >> >> On Mon, Jan 27, 2014 at 10:28 AM, Jake Wharton >> <[email protected]<javascript:> >> > wrote: >> >>> Well that’s up to the tools team but I presume it’d be on the DSL >>> somewhere. >>> >>> Random strawman example: >>> >>> compile('com.foo:bar:1.2.3') { >>> ignoreMinSdk true >>> } >>> >>> >>> >>> --- >>> Jake Wharton >>> http://about.me/jakewharton >>> >>> >>> On Mon, Jan 27, 2014 at 10:24 AM, Malachi de AElfweald < >>> [email protected] <javascript:>> wrote: >>> >>>> How would you do the "explicitly acknowledge and opt-out" per library? >>>> >>>> >>>> On Mon, Jan 27, 2014 at 10:23 AM, Jake Wharton >>>> <[email protected]<javascript:> >>>> > wrote: >>>> >>>>> I'd say that the build should fail unless you explicitly acknowledge >>>>> and opt-out of the sanity check on a per-library basis in your build file. >>>>> >>>>> There's no reason you can't use a library with a minSdkVersion higher >>>>> than yours so long as you do it carefully. It's the same with using >>>>> platform APIs that are newer than your minimum. >>>>> >>>>> >>>>> --- >>>>> Jake Wharton >>>>> http://about.me/jakewharton >>>>> >>>>> >>>>> On Mon, Jan 27, 2014 at 10:18 AM, Malachi de AElfweald < >>>>> [email protected] <javascript:>> wrote: >>>>> >>>>>> So if I declare minSdk as 10 in my application; but depend on a 3rd >>>>>> party library that says minSdk is 11... What is the recommended solution? >>>>>> It seems that the best option would be to force the build to be >>>>>> minSdk 11 and explain why in the logs -- rather than preventing the use >>>>>> of >>>>>> the 3rd party library? >>>>>> >>>>>> >>>>>> On Mon, Jan 27, 2014 at 10:05 AM, Xavier Ducrohet >>>>>> <[email protected]<javascript:> >>>>>> > wrote: >>>>>> >>>>>>> The minSdkVersion should always be the one declared in the app, and >>>>>>> all libraries should be equals or lesser then the app one. >>>>>>> >>>>>>> Formatting/Order, yes we should fix it to make it work better. >>>>>>> >>>>>>> >>>>>>> On Mon, Jan 27, 2014 at 10:01 AM, Malachi de AElfweald < >>>>>>> [email protected] <javascript:>> wrote: >>>>>>> >>>>>>>> Another area to address with the manifest merging might be >>>>>>>> max(minSdk) of all the libraries? >>>>>>>> >>>>>>>> Or making sure that things are grouped (permissions at the top, for >>>>>>>> example) rather than intermixed when there are multiple libraries...? >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Jan 27, 2014 at 9:54 AM, Xavier Ducrohet >>>>>>>> <[email protected]<javascript:> >>>>>>>> > wrote: >>>>>>>> >>>>>>>>> Not at the moment, but this is something we want to do. I'm >>>>>>>>> currently writing a spec for it actually. Work on it should start in >>>>>>>>> a few >>>>>>>>> weeks I think, as we realize that the current merger shows some big >>>>>>>>> limitations. >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Jan 27, 2014 at 3:56 AM, Roman Mazur >>>>>>>>> <[email protected]<javascript:> >>>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> Does Android Gradle plugin provide any instruments for >>>>>>>>>> controlling how manifest is merged? >>>>>>>>>> Particularly I'm interested whether there is a way to exclude >>>>>>>>>> some components declared in libraries from the final manifest. >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>> Google Groups "adt-dev" group. >>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>>> send an email to [email protected] <javascript:>. >>>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Xavier Ducrohet >>>>>>>>> Android SDK Tech Lead >>>>>>>>> Google Inc. >>>>>>>>> http://developer.android.com | http://tools.android.com >>>>>>>>> >>>>>>>>> Please do not send me questions directly. Thanks! >>>>>>>>> >>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "adt-dev" group. >>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>> send an email to [email protected] <javascript:>. >>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> Thank you, >>>>>>>> Malachi de Ælfweald | Sr. SDK Developer | Kontagent-Playhaven >>>>>>>> Mobile: +1 503-307-1597 >>>>>>>> Skype: malachid69 | Find me on >>>>>>>> LinkedIn<http://www.linkedin.com/in/malachid/> >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "adt-dev" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected] <javascript:>. >>>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Xavier Ducrohet >>>>>>> Android SDK Tech Lead >>>>>>> Google Inc. >>>>>>> http://developer.android.com | http://tools.android.com >>>>>>> >>>>>>> Please do not send me questions directly. Thanks! >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "adt-dev" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to [email protected] <javascript:>. >>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> Thank you, >>>>>> Malachi de Ælfweald | Sr. SDK Developer | Kontagent-Playhaven >>>>>> Mobile: +1 503-307-1597 >>>>>> Skype: malachid69 | Find me on >>>>>> LinkedIn<http://www.linkedin.com/in/malachid/> >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "adt-dev" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected] <javascript:>. >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "adt-dev" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected] <javascript:>. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> Thank you, >>>> Malachi de Ælfweald | Sr. SDK Developer | Kontagent-Playhaven >>>> Mobile: +1 503-307-1597 >>>> Skype: malachid69 | Find me on >>>> LinkedIn<http://www.linkedin.com/in/malachid/> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "adt-dev" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected] <javascript:>. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "adt-dev" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >> >> -- >> >> Thank you, >> Malachi de Ælfweald | Sr. SDK Developer | Kontagent-Playhaven >> Mobile: +1 503-307-1597 >> Skype: malachid69 | Find me on LinkedIn<http://www.linkedin.com/in/malachid/> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "adt-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Xavier Ducrohet > Android SDK Tech Lead > Google Inc. > http://developer.android.com | http://tools.android.com > > Please do not send me questions directly. Thanks! > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
