forax / pro

A Java build tool that works seamlessly with modules
GNU General Public License v3.0
103 stars 15 forks source link

User-defined plugins #28

Closed fisk closed 6 years ago

fisk commented 7 years ago

Is there any way for the user to build their own plugins? In particular, I have some ANTLR4 grammars that need to be source-to-source compiled into Java code to be included in a module.

forax commented 7 years ago

The current limitation is that all plugins as to be integrated with pro. So inside the source of pro, there is a folder plugins, and you can create your own plugin like the runner plugin or the tester plugin and then send me a pull request.

Plugins in the folder "plugins" have their own dependencies in deps but are built by one giant script in https://github.com/forax/pro/blob/master/src/main/java/com.github.forax.pro.bootstrap/com/github/forax/pro/bootstrap/Bootstrap.java

forax commented 6 years ago

There is now a method loadPlugin() [1] in Pro that allows pro to load any external plugins which fix this issue.

[1] https://github.com/forax/pro/blob/master/src/main/java/com.github.forax.pro/com/github/forax/pro/Pro.java#L92