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

Experimental - Generate a JSON representation of Stone #485

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

handstandsam
Copy link
Contributor

This experimental json format serializes the stone IR into a JSON so that it can be processed elsewhere and potentially used to generate other language targets.

To leverage it you can set the following in your project.

generateStone {
    generatorDir = "generator/json"
}

A .json file is created for each namespace under dropbox-sdk-java/build/stone-json/types

Copy link
Contributor

@devPalacio devPalacio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff!

@@ -52,7 +52,7 @@ public class StonePlugin : Plugin<Project> {
val mySpecDir: String = specDirPropNameValue ?: "src/${sourceSet.name}/stone"

stoneTask.specDir(mySpecDir)
stoneTask.generatorDir("${project.projectDir.absoluteFile}/generator")
stoneTask.generatorDir("${project.projectDir.absoluteFile}/generator/java")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Continues to default to Java. Put in the json generator in generator/json folder.

@handstandsam handstandsam merged commit e8b39d1 into main Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants