I have 2 code version to apply the BasePlugin in my own plugin.
-
Gradle version >= 2.3
project.getPluginManager().apply( BasePlugin.class );
-
Gradle version < 2.3
project.apply(ImmutableMap.of("type", BasePlugin.class));
The line for the older versions throw an:
java.lang.ClassNotFoundException: com.google.common.collect.ImmutableMap
if I run it with Gradle 2.3. Is there a syntax that work with newer and older versions?