简体   繁体   中英

Are grails plugins compiled at publish time

I see that grails plugins compile files of plugins too. So I am guessing grails plugins are not compiled into bytecode. Is there a way to make grails plugins compile into bytecode so they are not compiled over and over in all projects that have them as dependency?

Note: I'm using grails 2.4.3 but this question may apply to other versions as well.

So I am guessing grails plugins are not compiled into bytecode.

Grails plugins are compiled to bytecode. There is no other way to execute Groovy or Java code.

Is there a way to make grails plugins compile into bytecode so they are not compiled over and over in all projects that have them as dependency?

The code has to be compiled into bytecode before it can be executed. In the old plugin system (Grails 1 and 2), that happened at application compile time. With Grails 3 and Grails 4, plugins are compiled when they are distributed so when an app consumes them, the code has already been compiled to bytecode so the code is still being compiled to bytecode, but that is happening once when the plugin is published as opposed to happening when the app that uses the plugin is compiled.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM