Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate sdk-mock classes automatically #86

Open
jmatsu opened this issue Mar 25, 2024 · 0 comments
Open

Generate sdk-mock classes automatically #86

jmatsu opened this issue Mar 25, 2024 · 0 comments
Assignees

Comments

@jmatsu
Copy link
Contributor

jmatsu commented Mar 25, 2024

To follow up #83 and #84, we will be introducing a code-generation tool for sdk-mock.

  • Generate source files or class files based on sources in sdk.
  • Don't include additional dependencies to the both of sdk and sdk-mock.
  • APT doesn't work because generated code must be in sdk-mock module.
  • Don't share such files between sdk and sdk-mock directly.
    • It may cause a trouble in a compiler, as we know from our experiences.
  • Gradle task or integration is required.
    • We would like to compile two modules separately and smoothly.

We can use org.eclipse.jdt.core.dom (http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/dom/package-tree.html) package to build AST and Javapoet (https://github.com/square/javapoet) to generate Java codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant