The documentation for the various approaches for developing a Jira plugin (Jira Cloud, Atlassian SDK) isn't entirely clear on this: Are these approaches mutually exclusive in terms of compatibility with Jira Cloud and Jira Server products?
Technically, I suppose it should be possible to develop a Java-based plugin using the Atlassian SDK to be compatible with both Jira Cloud and Jira Server.
From reading the documentation it seems though that one would have to maintain separate codebases for Jira Cloud and Jira Server plugins.