### Example Project Structure Source: https://codeberg.org/stonecutter/docs/src/branch/main/docs/wiki/tips/interface-injection Illustrates the expected directory structure for a Stonecutter project using Fabric interface injection. Shows where the shared fabric.mod.json resides. ```plaintext . ├── src/main/resources/ │ └── fabric.mod.json ├── versions/ │ └── 1.21/ │ └── src/main/resources/ │ └── (fabric.mod.json expected here) ├── build.gradle[.kts] ├── stonecutter.gradle[.kts] └── settings.gradle[.kts] ``` -------------------------------- ### JSON5 Project Specification Examples Source: https://codeberg.org/stonecutter/docs/src/branch/main/docs/wiki/config/projects_display=source Demonstrates various ways to define project structures and versions in JSON5 format for Stonecutter. This includes composite and primitive project declarations, and configurations for single branch, branch-first, and version-first project setups. These examples are crucial for integrating dynamic data into Stonecutter's project management. ```json5 ```json5 [versions.json5] { project: "snapshot", // Optional, defaulting to `project`. version: "1.21.9-snapshot", // Optional, defaulting to `centralScript` in `settings.gradle[.kts]`. buildscript: "snapshot.gradle.kts" } ``` ``` ```json5 ```json5 [versions.json5] // Same fields as in the composite type, but separated with `:`. // To specify the build script without an explicit version, use the `::` separator. "snapshot:1.21.9-snapshot:snapshot.gradle.kts" ``` ``` ```json5 ```json5 [versions.json5] { "$schema": "https://codeberg.org/stonecutter/stonecutter/src/branch/0.7/tools/settings-schema.json", versions: [ "1.20.1", "1.21.1", "1.21.8", { project: "snapshot", version: "1.21.9-snapshot" } ] } ``` ``` ```json5 ```json5 [versions.json5] { "$schema": "https://codeberg.org/stonecutter/stonecutter/src/branch/0.7/tools/settings-schema.json", branches: { "": [ "1.20.1", "1.21.1", "1.21.8", { project: "snapshot", version: "1.21.9-snapshot" } ], "subproject": { // Metadata for third-party tools custom: "...", versions: [ "1.20.1", "1.21.1", "1.21.8" ] } } } ``` ``` ```json5 ```json5 [versions.json5] { "$schema": "https://codeberg.org/stonecutter/stonecutter/src/branch/0.7/tools/settings-schema.json", versions: { // `""` corresponds to the root branch in the directory of the `stonecutter.gradle[.kts]` file. "1.20.1": ["", "subproject"], "1.21.1": ["", "subproject"], "1.21.8": ["", "subproject"], "snapshot:1.21.9-snapshot": { // Metadata for third-party tools custom: "...", branches: [""] }, } } ``` ``` -------------------------------- ### JSON Project Specification (Composite) Source: https://codeberg.org/stonecutter/docs/src/branch/main/docs/wiki/config/projects Example of a composite project specification in JSON format used with Stonecutter. Includes project name, version, and buildscript fields. This specifies project details in JSON format for Stonecutter configuration. ```json { project: "snapshot", // Optional, defaulting to `project`. version: "1.21.9-snapshot", // Optional, defaulting to `centralScript` in `settings.gradle[.kts]`. buildscript: "snapshot.gradle.kts" } ``` -------------------------------- ### JSON Dependency Injection Example Source: https://codeberg.org/stonecutter/docs/src/branch/main/docs/wiki/tips/resource-processing_display=source An example of a `fabric.mod.json` file showing how dependencies are structured, with comments indicating where new dependencies can be injected. ```json { // other properties "requires": { "fabric": ">=0.16", "minecraft": "${minecraft}", // inject dependencies here } } ``` -------------------------------- ### Kotlin: Code Structure Example Source: https://codeberg.org/stonecutter/docs/src/branch/main/docs/wiki/config/params_display=source A basic example of code structure in Kotlin, illustrating nested scopes similar to `if-else` blocks. This provides context for Stonecutter's scope organization. ```kotlin if (condition1) { // Scope of the `condition1` branch action1() action2() } else // Scope of the `else` branch action3() ``` -------------------------------- ### JavaScript: Initialize Kotlin Playground Source: https://codeberg.org/stonecutter/docs/src/branch/main/docs/public/dokka/stitcher/dev.kikugie.stitcher.data.replacement/-replacement-executor/index This script asynchronously loads the Kotlin Playground library from a CDN. It's essential for enabling interactive Kotlin code examples within the documentation. ```javascript const storage = localStorage.getItem("dokka-dark-mode") ``` -------------------------------- ### HTML Structure for Stonecutter Website Source: https://codeberg.org/stonecutter/docs/src/branch/main/docs/public/dokka/stonecutter/dev.kikugie.stonecutter.process/-s-c-external-switch-task/version The HTML structure defines the document type, head section with meta tags, scripts, and stylesheets, and the body with navigation and container elements. ```html version