Gradle script for building compat (js/wasm) bundle of the Compose Multiplatform web app based on client wasm GC availability with single entry point and resources.
![image](https://private-user-images.githubusercontent.com/63979218/332587842-af7f72b1-c238-4954-b461-572d0aabd509.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2NTk4MTksIm5iZiI6MTcyMzY1OTUxOSwicGF0aCI6Ii82Mzk3OTIxOC8zMzI1ODc4NDItYWY3ZjcyYjEtYzIzOC00OTU0LWI0NjEtNTcyZDBhYWJkNTA5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE0VDE4MTgzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM0Mzg5NmM3YTgyOWUwM2Q1MGEyZGZkNmEwMzczNmZkZmZjZWZmMjM0YWQ3MGMyODMxZWU3N2FhNGU0M2IyMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.T3vjGrbBPI0tzEqxwdcJmywpIs8DHqEcJ3u12WRMJO4)
Tasks
compatBrowserProductionDistribution
compatBrowserDevelopmentDistribution
![image](https://private-user-images.githubusercontent.com/63979218/332588512-8fb29c7b-9fb9-4c01-ab10-48ac4e43f88f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2NTk4MTksIm5iZiI6MTcyMzY1OTUxOSwicGF0aCI6Ii82Mzk3OTIxOC8zMzI1ODg1MTItOGZiMjljN2ItOWZiOS00YzAxLWFiMTAtNDhhYzRlNDNmODhmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE0VDE4MTgzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWViYTliN2E4MjA0MThlMTc2Yjk4NWQyZDAzOTAyYjdmOGI2ZWFjZjY0ZDY0ZTRiZDU3MzlhZDI5NmI4YjZlOTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.E30dyyTL0SF9qla3HaC177kqD0uzOlxtXLY7IZtt-Zo)
are used to generate a compat bundle to the build/dist/compat
directory.
Task
- Assembles js and wasm distributables
- Merges two distributables to the single bundle
- Appends wasmGC detection script to the
index.html
- Appends hashes for script files to avoid browser caching
https://github.com/GoogleChromeLabs/wasm-feature-detect is used to detect wasmGC feature.
To run locally default jsBrowserRun
and wasmJsBrowserRun
tasks can be used. Script will automatically add required js files to the index.html