-
Notifications
You must be signed in to change notification settings - Fork 0
Configure gradle to check code samples
#53
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
Conversation
Also add the possibility to build or run the project.
armiol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaEvseeva please see my comments.
_code/EMBEDDING.md
Outdated
| 5. Execute: `./embed-code -config-path="config-of-your-choice.yml" -mode="embed"`. | ||
| 1. Make sure the project you're going to add has a top-level `buildAll` Gradle task. | ||
|
|
||
| See the [build of the Hello Example](https://github.com/spine-examples/hello/blob/master/build.gradle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's say this:
"See the build script of ... "
_code/EMBEDDING.md
Outdated
| 1. Make sure the project you're going to add has a top-level `buildAll` Gradle task. | ||
|
|
||
| See the [build of the Hello Example](https://github.com/spine-examples/hello/blob/master/build.gradle) | ||
| for the declaration of such a task. This task must present in both single- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"must be present"
_code/EMBEDDING.md
Outdated
| and multi-module Gradle example projects that are going to be used for | ||
| embedding into this site. | ||
|
|
||
| If you are interested in the details on why the `buildAll` task is needed, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's simplify this whole paragraph.
"See the declaration of buildAll task for more details."
|
|
||
| ### Adding a new small piece | ||
|
|
||
| 1. Add the code under `_code/samples/src` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss this vocally again.
I can see this folder as a Gradle project here, but not in this repo.
_script/check-samples
Outdated
| cd _code | ||
|
|
||
| # Check code samples. | ||
| ./embed-code-macos -config-path="config-v1.yml" -mode="check" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's mention in the README.md that there is a prerequisite for the scripting part to work: having an ARM-based Mac.
5cd9804 to
d74bbc0
Compare
armiol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaEvseeva please see my comment.
This PR configures
gradlescripts that allows:runSite– builds and runs the site locally.buildSite– builds the site without starting the server.embedCode– embeds the code samples into pages of the site.checkSamples– verifies that the source code samples embedded into the pages are up-to-date.buildAll– builds all included projects via depending on the top-level "buildAll" tasks declared in these projects.Other changes
_code/samplesproject for future using.