Skip to content

Generate sdk-mock classes automatically #86

@jmatsu

Description

@jmatsu

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions