Excluding Android plugins from certain OS versions?

I am using a plugin that no longer works pre Android 5.0, but I want to keep supporting Android 4.4 with app updates.

Is there any way to exclude the plugin from the build based on Android version?

What I want to avoid is having to have to separate project folders, as things will get messy very quickly.

Ideal world, I could still build for 4.4, but exclude the 5.0 plugin and any code that interacts with it.

I could just set the minimum OS to 5.0 but then 20% of my audience won’t get app updates.

Thanks

What plugin?

The issue is that Java doesn’t like it when you import duplicate classes, so if you want dual plugins of the same nature then you’re likely going to have trouble if any names are the same.

The plugin is https://uniwebview.com/

I don’t want to import duplicates, I just want to remove the functionality for 4.4 users

So I could make two APKs to upload to Google Play, one for 4.4 and one for 5.0+ BUT i don’t want to have to use two project folders.