Separate all auto-generated code into a dedicated module #1794
Replies: 1 comment
-
I think having a separate artifact with generated code is a good idea. This can then be used to write integration tests for other projects too!! Regarding the script, we can modify the script to run the correct Gradle task to generate the zip with web3j binary from the current codebase and then unpack the zip and modify the reference to web3j to be pointing to the current codebase version of web3j. Alternatively, we can also use the web3j Gradle plugin - but there is a circular dependency. You must release a new version of web3j - update the plugin to use the new version of web3j and release the plugin - update web3j to use the new version of the plugin and release web3j again. Quite complicated... |
Beta Was this translation helpful? Give feedback.
-
At the moment auto-gen code is nested within user-written code, which makes it difficult to keep changes isolated and ensure build continuity.
I propose creating a separate "web3j-autogen" module which would contain all autogenerated code. Moreover, this module would only have the necessary inputs (e.g. *.abi, *.bin) files to build the source files from and won't store the generated source, instead bundling the generated class files into a separate artifact.
The various shell scripts also reference web3j that is installed on the system, which is not the version that is to be used. Moreover, when generating source then we need to use the current codebase, not the one installed via web3j.
Beta Was this translation helpful? Give feedback.
All reactions