corda / corda-gradle-plugins

Gradle plugins used by Corda and Cordapps
Other
24 stars 36 forks source link

"Slim-JAR" from CordApp project (for RPC/re-use outside of Corda) #167

Open adnklauser opened 5 years ago

adnklauser commented 5 years ago

We are currently programming against Corda 4 and we feel that the way the cordapp plugin achieves its goal makes our gradle setup unnecessarily bloated.

Expected

We maintain our flows/contracts/states in one gradle project. We can configure this gradle project to produce

Actual

Workaround

Naturally, we can set up a second gradle project that produces the slim "client"/"api" JAR:

Drawbacks of the workaround:

Ideas

CordApp feels a bit like a WAR/EAR. There is a CordApp-specific manifest file and it contains its dependencies (albeit unpacked).

Would be an option to structure the CordappPlugin more like the WarPlugin so that it configures a type: CordApp task (subclass of Jar) that is independent of any jar task configured by the JavaLibraryPlugin?

As for the generated Maven POM, it should be possible to control the POM that gets used via the MavenPublication.

soudmaijer commented 10 months ago

@adnklauser did you ever managed to work around this issue?