{"id":25144425,"url":"https://github.com/openmf/kmp-build-web-app-action","last_synced_at":"2025-04-03T06:14:00.156Z","repository":{"id":268462815,"uuid":"904430388","full_name":"openMF/kmp-build-web-app-action","owner":"openMF","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-16T22:26:36.000Z","size":5,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-02T12:50:59.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openMF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-12-16T21:52:25.000Z","updated_at":"2024-12-17T21:21:28.000Z","dependencies_parsed_at":"2024-12-16T23:34:57.745Z","dependency_job_id":"7a7d674d-a813-4314-b1cb-97621ff3ed64","html_url":"https://github.com/openMF/kmp-build-web-app-action","commit_stats":null,"previous_names":["openmf/kmp-build-web-app-action"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openMF%2Fkmp-build-web-app-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openMF%2Fkmp-build-web-app-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openMF%2Fkmp-build-web-app-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openMF%2Fkmp-build-web-app-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openMF","download_url":"https://codeload.github.com/openMF/kmp-build-web-app-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246944386,"owners_count":20858772,"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":"2025-02-08T19:46:15.511Z","updated_at":"2025-04-03T06:14:00.133Z","avatar_url":"https://github.com/openMF.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# KMP Build Web App GitHub Action\n\n## Overview\n\nThis GitHub Action is designed to build a Kotlin Multiplatform (KMP) web application using Gradle. It automates the process of setting up the development environment, caching dependencies, and packaging the web application.\n\n## Inputs\n\n### `web_package_name`\n**Required**: Yes\n- Description: Name of the web project module\n- Used to specify the correct path for building and uploading the web app artifact\n\n## Outputs\n\n### `artifact-name`\n- Description: Name of the generated artifact\n- Value: `web-app`\n\n## Action Workflow\n\n```mermaid\nflowchart TD\n    A[Start Action] --\u003e B[Set up Java Development Environment\\nJava 17 with Zulu OpenJDK]\n    B --\u003e C[Setup Gradle]\n    C --\u003e D[Cache Gradle Dependencies]\n    D --\u003e E[Run jsBrowserDistribution\\nPackage Web Application]\n    E --\u003e F[Upload Web App Artifact]\n    F --\u003e G[End Action]\n```\n\nThe action performs the following steps:\n\n1. **Set up Java Development Environment**\n    - Uses Zulu distribution of OpenJDK\n    - Configures Java version 17\n\n2. **Setup Gradle**\n    - Prepares Gradle for building the project\n\n3. **Cache Management**\n    - Caches Gradle dependencies, build outputs, and Kotlin/Native artifacts\n    - Speeds up subsequent builds by reusing cached components\n    - Caches include:\n        - Gradle caches\n        - Gradle wrapper\n        - Kotlin/Native artifacts\n        - Build directory\n\n4. **Package Web Application**\n    - Runs `./gradlew jsBrowserDistribution` to create the web app distribution\n\n5. **Artifact Upload**\n    - Uploads the web app artifact from the specified module's build directory\n\n## Usage Example\n\n```yaml\nname: Build Web App\n\non: [push, pull_request]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: openMF/kmp-build-web-app-action@v1.0.0\n        with:\n          web_package_name: 'web'\n```\n\n## Requirements\n\n- GitHub Actions runner with bash support\n- Gradle project configured for Kotlin Multiplatform\n- Java 17\n- Zulu OpenJDK distribution\n\n## Best Practices\n\n- Ensure your Gradle build scripts are configured for JS browser distribution\n- Verify that the `web_package_name` matches your project's module structure\n- Use consistent Gradle and Java versions across local and CI environments\n\n## Troubleshooting\n\n- Check Gradle logs if the build fails\n- Verify that the `jsBrowserDistribution` task is correctly configured in your build script\n- Ensure all necessary dependencies are declared in your Gradle files","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmf%2Fkmp-build-web-app-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenmf%2Fkmp-build-web-app-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmf%2Fkmp-build-web-app-action/lists"}