diff --git a/.gitignore b/.gitignore index 088e0f189e..a99e625403 100644 --- a/.gitignore +++ b/.gitignore @@ -4,13 +4,7 @@ out *.iml .gradle /local.properties -/.idea -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml +.idea/ .DS_Store build/ /captures diff --git a/examples/codeviewer/README.md b/examples/codeviewer/README.md index 8df821f1ba..d9dc237229 100644 --- a/examples/codeviewer/README.md +++ b/examples/codeviewer/README.md @@ -4,7 +4,7 @@ MPP Code Viewer example for desktop/android written in Multiplatform Compose lib * To run, launch command: `./gradlew :desktop:run` * Or choose **desktop** configuration in IDE and run it. - ![desktop-run-configuration.png](desktop-run-configuration.png) + ![desktop-run-configuration.png](screenshots/desktop-run-configuration.png) ### Building native desktop distribution ``` diff --git a/examples/codeviewer/desktop-run-configuration.png b/examples/codeviewer/screenshots/desktop-run-configuration.png similarity index 100% rename from examples/codeviewer/desktop-run-configuration.png rename to examples/codeviewer/screenshots/desktop-run-configuration.png diff --git a/examples/falling-balls/README.md b/examples/falling-balls/README.md index 6e405524b5..f4eba98b85 100644 --- a/examples/falling-balls/README.md +++ b/examples/falling-balls/README.md @@ -3,5 +3,5 @@ Falling Balls game ### Running desktop application * To run, launch command: `./gradlew run` * Or choose **desktop** configuration in IDE and run it. - ![desktop-run-configuration.png](desktop-run-configuration.png) + ![desktop-run-configuration.png](screenshots/desktop-run-configuration.png) diff --git a/examples/falling-balls/desktop-run-configuration.png b/examples/falling-balls/screenshots/desktop-run-configuration.png similarity index 100% rename from examples/falling-balls/desktop-run-configuration.png rename to examples/falling-balls/screenshots/desktop-run-configuration.png diff --git a/examples/imageviewer/README.md b/examples/imageviewer/README.md index c7ede93bc7..64a1794e50 100755 --- a/examples/imageviewer/README.md +++ b/examples/imageviewer/README.md @@ -3,7 +3,7 @@ An example of image gallery for remote server image viewing, based on Jetpack Co ### Running desktop application * To run, launch command: `./gradlew :desktop:run` * Or choose **desktop** configuration in IDE and run it. - ![desktop-run-configuration.png](desktop-run-configuration.png) + ![desktop-run-configuration.png](screenshots/desktop-run-configuration.png) ### Building native desktop distribution ``` diff --git a/examples/imageviewer/desktop-run-configuration.png b/examples/imageviewer/screenshots/desktop-run-configuration.png similarity index 100% rename from examples/imageviewer/desktop-run-configuration.png rename to examples/imageviewer/screenshots/desktop-run-configuration.png diff --git a/examples/intellij-plugin-with-experimental-shared-base/README.md b/examples/intellij-plugin-with-experimental-shared-base/README.md index 550ed1fffa..8af73b48ec 100644 --- a/examples/intellij-plugin-with-experimental-shared-base/README.md +++ b/examples/intellij-plugin-with-experimental-shared-base/README.md @@ -12,7 +12,7 @@ and allows sharing Compose runtime between multiple plugins 1. Start test IDE: * Run the following command in terminal: `./gradlew runIde` * Or choose **runIde** configuration in IDE and run it. - ![ide-run-configuration.png](ide-run-configuration.png) + ![ide-run-configuration.png](screenshots/ide-run-configuration.png) 2. Create a new project or open any existing; 3. Select `Show Compose Demo...` from the `Tools` menu. diff --git a/examples/intellij-plugin-with-experimental-shared-base/ide-run-configuration.png b/examples/intellij-plugin-with-experimental-shared-base/screenshots/ide-run-configuration.png similarity index 100% rename from examples/intellij-plugin-with-experimental-shared-base/ide-run-configuration.png rename to examples/intellij-plugin-with-experimental-shared-base/screenshots/ide-run-configuration.png diff --git a/examples/intellij-plugin/README.md b/examples/intellij-plugin/README.md index 4912ad9ade..c78000edee 100644 --- a/examples/intellij-plugin/README.md +++ b/examples/intellij-plugin/README.md @@ -5,7 +5,7 @@ To run the example: 1. from directory `compose-jb/examples/intellij-plugin`: * Run command in terminal `./gradlew runIde`. * Or choose **runIde** configuration in IDE and run it. - ![ide-run-configuration.png](ide-run-configuration.png) + ![ide-run-configuration.png](screenshots/ide-run-configuration.png) 2. create project or open any existing 3. from menu `Tools` select `Show Compose Demo...` diff --git a/examples/intellij-plugin/ide-run-configuration.png b/examples/intellij-plugin/screenshots/ide-run-configuration.png similarity index 100% rename from examples/intellij-plugin/ide-run-configuration.png rename to examples/intellij-plugin/screenshots/ide-run-configuration.png diff --git a/examples/issues/README.md b/examples/issues/README.md index 5617219de8..4e3a73f80c 100644 --- a/examples/issues/README.md +++ b/examples/issues/README.md @@ -4,7 +4,7 @@ Github Issues viewer example written in Jetpack Compose UI library. ### Running desktop application * To run, launch command: `./gradlew :desktop:run` * Or choose **desktop** configuration in IDE and run it. - ![desktop-run-configuration.png](desktop-run-configuration.png) + ![desktop-run-configuration.png](screenshots/desktop-run-configuration.png) ### Building native desktop distribution ``` diff --git a/examples/issues/desktop-run-configuration.png b/examples/issues/screenshots/desktop-run-configuration.png similarity index 100% rename from examples/issues/desktop-run-configuration.png rename to examples/issues/screenshots/desktop-run-configuration.png diff --git a/examples/notepad/README.md b/examples/notepad/README.md index d3974850c4..26da73ce5f 100644 --- a/examples/notepad/README.md +++ b/examples/notepad/README.md @@ -3,7 +3,7 @@ Notepad example for desktop written in Compose for Desktop library, using Compos ### Running desktop application * To run, launch command: `./gradlew run` * Or choose **desktop** configuration in IDE and run it. - ![desktop-run-configuration.png](desktop-run-configuration.png) + ![desktop-run-configuration.png](screenshots/desktop-run-configuration.png) ### Building native desktop distribution ``` diff --git a/examples/notepad/desktop-run-configuration.png b/examples/notepad/screenshots/desktop-run-configuration.png similarity index 100% rename from examples/notepad/desktop-run-configuration.png rename to examples/notepad/screenshots/desktop-run-configuration.png diff --git a/examples/todoapp-lite/README.md b/examples/todoapp-lite/README.md index d53ea8d327..c35555d64a 100755 --- a/examples/todoapp-lite/README.md +++ b/examples/todoapp-lite/README.md @@ -5,7 +5,7 @@ Supported targets: Android and Desktop. ### Running desktop application * To run, launch command: `./gradlew :desktop:run` * Or choose **desktop** configuration in IDE and run it. - ![desktop-run-configuration.png](desktop-run-configuration.png) + ![desktop-run-configuration.png](screenshots/desktop-run-configuration.png) ### Building native desktop distribution ``` diff --git a/examples/todoapp-lite/desktop-run-configuration.png b/examples/todoapp-lite/screenshots/desktop-run-configuration.png similarity index 100% rename from examples/todoapp-lite/desktop-run-configuration.png rename to examples/todoapp-lite/screenshots/desktop-run-configuration.png diff --git a/examples/todoapp/README.md b/examples/todoapp/README.md index 1efcddc185..783993574a 100755 --- a/examples/todoapp/README.md +++ b/examples/todoapp/README.md @@ -36,7 +36,7 @@ Features: ### Running desktop application * To run, launch command: `./gradlew :desktop:run` * Or choose **desktop** configuration in IDE and run it. - ![desktop-run-configuration.png](desktop-run-configuration.png) + ![desktop-run-configuration.png](screenshots/desktop-run-configuration.png) #### Building native desktop distribution ``` @@ -51,7 +51,7 @@ Open project in Intellij IDEA or Android Studio and run "android" configuration. ### Running Web browser application * To run, launch command: `./gradlew :web:jsBrowserDevelopmentRun` * Or choose **browser** configuration in IDE and run it. - ![browser-run-configuration.png](browser-run-configuration.png) + ![browser-run-configuration.png](screenshots/browser-run-configuration.png) ### Running iOS application diff --git a/examples/todoapp/browser-run-configuration.png b/examples/todoapp/screenshots/browser-run-configuration.png similarity index 100% rename from examples/todoapp/browser-run-configuration.png rename to examples/todoapp/screenshots/browser-run-configuration.png diff --git a/examples/todoapp/desktop-run-configuration.png b/examples/todoapp/screenshots/desktop-run-configuration.png similarity index 100% rename from examples/todoapp/desktop-run-configuration.png rename to examples/todoapp/screenshots/desktop-run-configuration.png diff --git a/examples/visual-effects/README.md b/examples/visual-effects/README.md index 1ee06e9ee1..0943c31b12 100644 --- a/examples/visual-effects/README.md +++ b/examples/visual-effects/README.md @@ -3,5 +3,5 @@ Several visual effects implmented with Compose Multiplatform, used in 1.0 releas ### Running desktop application * To run, launch command: `./gradlew run` * Or choose **desktop** configuration in IDE and run it. - ![desktop-run-configuration.png](desktop-run-configuration.png) + ![desktop-run-configuration.png](screenshots/desktop-run-configuration.png) diff --git a/examples/visual-effects/desktop-run-configuration.png b/examples/visual-effects/screenshots/desktop-run-configuration.png similarity index 100% rename from examples/visual-effects/desktop-run-configuration.png rename to examples/visual-effects/screenshots/desktop-run-configuration.png diff --git a/examples/web-compose-bird/README.md b/examples/web-compose-bird/README.md index 2fb07d6439..2f2db4e10f 100644 --- a/examples/web-compose-bird/README.md +++ b/examples/web-compose-bird/README.md @@ -1,6 +1,6 @@ # 🐦 Compose Bird -![](demo.gif) +![](screenshots/demo.gif) ![latestVersion](https://img.shields.io/github/v/release/theapache64/compose-bird) @@ -18,7 +18,7 @@ * To run, launch command: `./gradlew jsBrowserRun` * Or choose **browser** configuration in IDE and run it. - ![browser-run-configuration.png](browser-run-configuration.png) + ![browser-run-configuration.png](screenshots/browser-run-configuration.png) ## 📦 Distribute diff --git a/examples/web-compose-bird/cover.jpeg b/examples/web-compose-bird/cover.jpeg deleted file mode 100644 index 7ad7efca86..0000000000 Binary files a/examples/web-compose-bird/cover.jpeg and /dev/null differ diff --git a/examples/web-compose-bird/browser-run-configuration.png b/examples/web-compose-bird/screenshots/browser-run-configuration.png similarity index 100% rename from examples/web-compose-bird/browser-run-configuration.png rename to examples/web-compose-bird/screenshots/browser-run-configuration.png diff --git a/examples/web-compose-bird/demo.gif b/examples/web-compose-bird/screenshots/demo.gif similarity index 100% rename from examples/web-compose-bird/demo.gif rename to examples/web-compose-bird/screenshots/demo.gif diff --git a/examples/web-compose-in-js/README.MD b/examples/web-compose-in-js/README.MD index 0320575a52..ebcc0fc129 100644 --- a/examples/web-compose-in-js/README.MD +++ b/examples/web-compose-in-js/README.MD @@ -70,7 +70,7 @@ config.output.library = "MyComposables"; ### Running Web browser application * To run, launch command: `./gradlew :jsBrowserDevelopmentRun` * Or choose **browser** configuration in IDE and run it. - ![browser-run-configuration.png](browser-run-configuration.png) + ![browser-run-configuration.png](screenshots/browser-run-configuration.png) ### Building and using the output diff --git a/examples/web-compose-in-js/build.gradle.kts b/examples/web-compose-in-js/build.gradle.kts index e01aa8b934..7914f863a5 100644 --- a/examples/web-compose-in-js/build.gradle.kts +++ b/examples/web-compose-in-js/build.gradle.kts @@ -1,8 +1,8 @@ import org.jetbrains.compose.compose plugins { - kotlin("multiplatform") version "1.6.10" - id("org.jetbrains.compose") version "1.0.1" + kotlin("multiplatform") + id("org.jetbrains.compose") } group = "me.user" diff --git a/examples/web-compose-in-js/gradle.properties b/examples/web-compose-in-js/gradle.properties index 65c9278611..01a11c4581 100644 --- a/examples/web-compose-in-js/gradle.properties +++ b/examples/web-compose-in-js/gradle.properties @@ -2,3 +2,5 @@ kotlin.code.style=official kotlin.mpp.enableGranularSourceSetsMetadata=true kotlin.native.enableDependencyPropagation=false kotlin.js.webpack.major.version=4 +kotlin.version=1.7.10 +compose.version=1.2.0-beta02 diff --git a/examples/web-compose-in-js/browser-run-configuration.png b/examples/web-compose-in-js/screenshots/browser-run-configuration.png similarity index 100% rename from examples/web-compose-in-js/browser-run-configuration.png rename to examples/web-compose-in-js/screenshots/browser-run-configuration.png diff --git a/examples/web-compose-in-js/settings.gradle.kts b/examples/web-compose-in-js/settings.gradle.kts index ae8fb66b50..5df0eb175c 100644 --- a/examples/web-compose-in-js/settings.gradle.kts +++ b/examples/web-compose-in-js/settings.gradle.kts @@ -3,7 +3,11 @@ pluginManagement { gradlePluginPortal() maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") } - + + plugins { + kotlin("multiplatform").version(extra["kotlin.version"] as String) + id("org.jetbrains.compose").version(extra["compose.version"] as String) + } } rootProject.name = "web-compose-in-js" diff --git a/examples/web-landing/README.md b/examples/web-landing/README.md index 5727745049..5e7f325b85 100755 --- a/examples/web-landing/README.md +++ b/examples/web-landing/README.md @@ -3,4 +3,4 @@ Landing page of Compose for Web ### Running Web browser application * To run, launch command: `./gradlew :jsBrowserRun` * Or choose **browser** configuration in IDE and run it. - ![browser-run-configuration.png](browser-run-configuration.png) + ![browser-run-configuration.png](screenshots/browser-run-configuration.png) diff --git a/examples/web-landing/browser-run-configuration.png b/examples/web-landing/screenshots/browser-run-configuration.png similarity index 100% rename from examples/web-landing/browser-run-configuration.png rename to examples/web-landing/screenshots/browser-run-configuration.png diff --git a/examples/web-with-react/README.md b/examples/web-with-react/README.md index 62e62b7405..8706bbfa81 100644 --- a/examples/web-with-react/README.md +++ b/examples/web-with-react/README.md @@ -21,4 +21,4 @@ Here is a good tutorial - [Using packages from NPM](https://play.kotlinlang.org/ ### Running web application * To run, launch command: `./gradlew :jsBrowserRun` * Or choose **browser** configuration in IDE and run it. - ![browser-run-configuration.png](browser-run-configuration.png) + ![browser-run-configuration.png](screenshots/browser-run-configuration.png) diff --git a/examples/web-with-react/browser-run-configuration.png b/examples/web-with-react/screenshots/browser-run-configuration.png similarity index 100% rename from examples/web-with-react/browser-run-configuration.png rename to examples/web-with-react/screenshots/browser-run-configuration.png diff --git a/examples/widgets-gallery/README.md b/examples/widgets-gallery/README.md index e2dd6ba105..396033e39e 100644 --- a/examples/widgets-gallery/README.md +++ b/examples/widgets-gallery/README.md @@ -11,7 +11,7 @@ demonstrating how to use various Material widgets. ### Running desktop application * To run, launch command: `./gradlew :desktop:run` * Or choose **desktop** configuration in IDE and run it. - ![desktop-run-configuration.png](desktop-run-configuration.png) + ![desktop-run-configuration.png](screenshots/desktop-run-configuration.png) ### Building native desktop distribution ``` diff --git a/examples/widgets-gallery/desktop-run-configuration.png b/examples/widgets-gallery/screenshots/desktop-run-configuration.png similarity index 100% rename from examples/widgets-gallery/desktop-run-configuration.png rename to examples/widgets-gallery/screenshots/desktop-run-configuration.png diff --git a/templates/web-template/.gitignore b/templates/web-template/.gitignore new file mode 100644 index 0000000000..a32b16597b --- /dev/null +++ b/templates/web-template/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +build/ +/captures +.externalNativeBuild +.cxx diff --git a/templates/web-template/.run/browser.run.xml b/templates/web-template/.run/browser.run.xml new file mode 100644 index 0000000000..ab1d4d1969 --- /dev/null +++ b/templates/web-template/.run/browser.run.xml @@ -0,0 +1,23 @@ + + + + + + + true + true + false + + + \ No newline at end of file diff --git a/templates/web-template/README.md b/templates/web-template/README.md new file mode 100644 index 0000000000..fcd77188f5 --- /dev/null +++ b/templates/web-template/README.md @@ -0,0 +1,4 @@ +Compose Web Application + +- `./gradlew jsBrowserRun` - run application in a browser +- `./gradlew jsBrowserProductionWebpack` - produce the output in `build/distributions` \ No newline at end of file