Skip to content

Conversation

@JuliaEvseeva
Copy link
Contributor

@JuliaEvseeva JuliaEvseeva commented Dec 16, 2025

This PR configures gradle scripts 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

  • Brings the GitHub Action that checks the code embedding.
  • Brings the configured _code/samples project for future using.

@JuliaEvseeva JuliaEvseeva self-assigned this Dec 16, 2025
Copy link
Contributor

@armiol armiol left a 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.

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)
Copy link
Contributor

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 ... "

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-
Copy link
Contributor

Choose a reason for hiding this comment

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

"must be present"

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,
Copy link
Contributor

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.
Copy link
Contributor

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.

cd _code

# Check code samples.
./embed-code-macos -config-path="config-v1.yml" -mode="check"
Copy link
Contributor

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.

@JuliaEvseeva JuliaEvseeva requested a review from armiol December 16, 2025 17:34
Copy link
Contributor

@armiol armiol left a 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.

@JuliaEvseeva JuliaEvseeva requested a review from armiol December 16, 2025 19:06
@JuliaEvseeva JuliaEvseeva merged commit 3570a0b into migration-to-hugo Dec 17, 2025
2 checks passed
@JuliaEvseeva JuliaEvseeva deleted the check-samples branch December 17, 2025 12:53
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.

3 participants