Java – How to add ‘apply plugin’ to build.gradle in Codename One Android project to add native libraries?

How to add ‘apply plugin’ to build.gradle in Codename One Android project to add native libraries?… here is a solution to the problem.

How to add ‘apply plugin’ to build.gradle in Codename One Android project to add native libraries?

I browsed Advanced Topics on Codename One’s website, but didn’t find anything on how to add for the need Apply plugin: [plugin name here] to the application’s top-level build.gradle< native Android library implementation instructions file for information.

Is there a way to do this?

Solution

There is currently no way to add a new plugin entry, I added a new build hint android.gradlePlugin, which should be available in the next server update (Friday, September 29, 2017).

You should be able to use it like this (untested):

android.gradlePlugin=apply plugin: 'pluginA'; apply plugin: 'pluginB';

Related Problems and Solutions