Is it possible to build a cordova plugin from an Android app?

Hello everyone.

I’ve build an Android app which I would like to use as a plugin with Ionic 5. I don’t know if there is a way to transform this application in a Cordova plugin, and then add this to my Ionic project.

Thanks in advance.