{"id":14460136,"url":"https://github.com/Kotlin/Storytale","last_synced_at":"2025-08-28T18:31:45.578Z","repository":{"id":238472884,"uuid":"796628908","full_name":"Kotlin/Storytale","owner":"Kotlin","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-17T13:13:41.000Z","size":572,"stargazers_count":291,"open_issues_count":0,"forks_count":5,"subscribers_count":17,"default_branch":"main","last_synced_at":"2024-12-17T13:26:36.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kotlin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-06T10:21:23.000Z","updated_at":"2024-12-17T13:11:10.000Z","dependencies_parsed_at":"2024-05-06T11:35:44.447Z","dependency_job_id":"b668fb1e-4649-4171-8c62-1e7e62b4fc3f","html_url":"https://github.com/Kotlin/Storytale","commit_stats":null,"previous_names":["kotlin/storytale"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2FStorytale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2FStorytale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2FStorytale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2FStorytale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kotlin","download_url":"https://codeload.github.com/Kotlin/Storytale/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231294144,"owners_count":18354140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-01T21:01:04.788Z","updated_at":"2025-08-28T18:31:45.559Z","avatar_url":"https://github.com/Kotlin.png","language":"Kotlin","readme":"![Frame 482360](https://github.com/user-attachments/assets/b90b5776-f2f4-4385-8b7d-94eb912eacdf)\n\n[![Incubator](https://jb.gg/badges/incubator-plastic.svg)](https://github.com/JetBrains#jetbrains-on-github)\n\n# Storytale\n\nStorytale is a Gradle Plugin designed to help developers to show their composables and develop them isolated by generating a gallery of the project components.\nCheck the `examples` and their generated web gallery [here](https://kotlin.github.io/Storytale)\n\nSince Storytale is still in the early stages of development, the api is marked as unstable, but this section will also show you how to use `Storytale` to write code for your components, so let's get started! 🌟\n\n\u003cimg width=\"1604\" alt=\"All platforms\" src=\"https://github.com/user-attachments/assets/b9a3d08f-7ff5-4a55-a0fc-904b4279e116\"\u003e\n\n## ⚙️ Getting Started\n\n### 1. Setup\n\n#### Import Dependencies\n\n\u003cdetails close\u003e\n  \u003csummary\u003eusing \u003cb\u003eVersion Catalog\u003c/b\u003e\u003c/summary\u003e\n\n\u003e **libs.versions.toml**\n\n```toml\n[versions]\nstorytale = \"0.0.1+dev5\"\n\n[plugins]\nstorytale = { id = \"org.jetbrains.compose.storytale\", version.ref = \"storytale\" }\n```\n\nFor the latest version check out the [Releases page](https://github.com/Kotlin/Storytale/releases)\n\n\u003e **build.gradle.kts** `root level`\n```kotlin\nplugins {\n  alias(libs.plugins.storytale) apply false\n}\n```\n\u003c/details\u003e\n\n\u003e **build.gradle.kts** `app level`\n```kotlin\nplugins {\n  alias(libs.plugins.storytale)\n}\n```\n\u003c/details\u003e\n\n```kotlin\nrepositories {\n  mavenCentral()\n  maven(\"https://maven.pkg.jetbrains.space/public/p/compose/dev\")\n}\n```\n\n\u003e [!NOTE]  \n\u003e Storytale **has not** yet released its first version on `mavenCentral`. Currently, we publish dev builds to maven(\"https://maven.pkg.jetbrains.space/public/p/compose/dev\"), so it's required to add this repository as shown above.\n\n### 2. Create Sourcesets for Storytale on the target platform (for multi-platform projects)\n\nStorytale can be used for Compose Multiplatform projects. To start using the Storytale API, you need to define a sourceset for the component you want to test (for example, it might only be used for `Android/iOS` platforms, or it could be common for all platforms).\n\nIn your app's 'src' folder, go to New -\u003e Directory:\n\n\u003cimg width=\"355\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a9dc68a9-3a28-4d26-a128-f0372b52d08b\"\u003e\n\n### 3. Usage\n\nNow, your project structure will look like this:\n\n```\n└── src/\n    ├── androidMain\n    ├── commonMain\n    ├── xxxxxStories/\n    │   └── kotlin\n    └── desktopMain\n```\n\nLet's try to write a simple function in `commonMain`:\n\n`commonMain/PrimaryButton.kt`\n```kotlin\n@Composable\nfun PrimaryButton(onClick: () -\u003e Unit, enabled: Boolean = true) {\n  Button(onClick = onClick, enabled = enabled) {\n    Text(\"Click me!\")\n  }\n}\n```\n\n`commonStories/kotlin/PrimaryButton.story.kt`\n```kotlin\nimport org.jetbrains.compose.storytale.story\n\nval `PrimaryButton default state` by story {\n   val enabled by parameter(true)\n   PrimaryButton(onClick = {}, enabled = enabled)\n}\n```\n\nNext, let's run the `desktopStoriesRun` command, you can find it in the `project/Storytale` section on the right side of the Gradle panel.\n\n\u003cimg width=\"485\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a4ff8e1a-b549-4085-bac3-a4e6f8f246aa\"\u003e\n\nIf you can't find all Gradle tasks containing `Storytale` after syncing, check if this option is enabled:\n\n`settings-\u003eExperimental`\n\n\u003cimg width=\"624\" alt=\"image\" src=\"https://github.com/user-attachments/assets/eed99739-121e-49ce-82ad-2217676a5869\"\u003e\n\n\n## Building and Contributing\n\nOnce the sync is successful, run `./gradlew publishToMavenLocal`.\n\nAt this point, if you see these Storytale `Gradle tasks`, it means you’ve successfully set up the project and can start contributing! :)\n\n\u003cimg width=\"453\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e9cfa634-27f2-4613-9579-194c3e6c09a4\"\u003e\n\nBefore running `XXXXStoriesRun`, you need to run `./gradlew publishToMavenLocal` to deploy the latest changes if you've modified any part of the code (except for examples module)\n\n#### About project structure\n\n```\n.\n└── modules/\n    ├── compiler-plugin\n    ├── gallery\n    ├── gradle-plugin\n    └── runtime\n```\n\n##### compiler-plugin\n\nIncludes the entry point of the Storytale compiler plugin and its related features.\n\n##### gallery\n\nThe gallery represents the final, fully functional multi-platform application that is produced by Storytale.\n\n##### gradle-plugin\n\nAll aspects related to building Storytale, including various Gradle tasks, generating Storytale apps for different platforms, and so on.\n\n#### runtime\n\nThe runtime module is designed to provide developers with essential APIs during the coding process\n\n## Feedback and questions\n\nShare your feedback or questions in our [#storytale](https://slack-chats.kotlinlang.org/c/storytale) Slack channel.\n[Get a Slack invite](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up).\n","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKotlin%2FStorytale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKotlin%2FStorytale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKotlin%2FStorytale/lists"}