Browse Source

examples README and .run configurations (#2355)

pull/2359/head
dima.avdeev 2 years ago committed by GitHub
parent
commit
d2b9faa72e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      examples/codeviewer/README.md
  2. BIN
      examples/codeviewer/desktop-run-configuration.png
  3. 23
      examples/falling-balls/.run/desktop.run.xml
  4. 7
      examples/falling-balls/README.md
  5. BIN
      examples/falling-balls/desktop-run-configuration.png
  6. 6
      examples/imageviewer/README.md
  7. BIN
      examples/imageviewer/desktop-run-configuration.png
  8. 23
      examples/intellij-plugin-with-experimental-shared-base/.run/runIde.run.xml
  9. 5
      examples/intellij-plugin-with-experimental-shared-base/README.md
  10. BIN
      examples/intellij-plugin-with-experimental-shared-base/ide-run-configuration.png
  11. 23
      examples/intellij-plugin/.run/runIde.run.xml
  12. 5
      examples/intellij-plugin/README.md
  13. BIN
      examples/intellij-plugin/ide-run-configuration.png
  14. 23
      examples/issues/.run/desktop.run.xml
  15. 6
      examples/issues/README.md
  16. BIN
      examples/issues/desktop-run-configuration.png
  17. 6
      examples/notepad/README.md
  18. BIN
      examples/notepad/desktop-run-configuration.png
  19. 23
      examples/todoapp-lite/.run/desktop.run.xml
  20. 6
      examples/todoapp-lite/README.md
  21. BIN
      examples/todoapp-lite/desktop-run-configuration.png
  22. 23
      examples/todoapp/.run/browser.run.xml
  23. 23
      examples/todoapp/.run/desktop.run.xml
  24. 12
      examples/todoapp/README.md
  25. BIN
      examples/todoapp/browser-run-configuration.png
  26. BIN
      examples/todoapp/desktop-run-configuration.png
  27. 23
      examples/visual-effects/.run/desktop.run.xml
  28. 6
      examples/visual-effects/README.md
  29. BIN
      examples/visual-effects/desktop-run-configuration.png
  30. 23
      examples/web-compose-bird/.run/browser.run.xml
  31. 7
      examples/web-compose-bird/README.md
  32. BIN
      examples/web-compose-bird/browser-run-configuration.png
  33. 1
      examples/web-compose-bird/gradle.properties
  34. 23
      examples/web-compose-in-js/.run/browser.run.xml
  35. 5
      examples/web-compose-in-js/README.MD
  36. BIN
      examples/web-compose-in-js/browser-run-configuration.png
  37. 23
      examples/web-landing/.run/browser.run.xml
  38. 6
      examples/web-landing/README.md
  39. BIN
      examples/web-landing/browser-run-configuration.png
  40. 23
      examples/web-with-react/.run/browser.run.xml
  41. 6
      examples/web-with-react/README.md
  42. BIN
      examples/web-with-react/browser-run-configuration.png
  43. 6
      examples/widgets-gallery/README.md
  44. BIN
      examples/widgets-gallery/desktop-run-configuration.png

7
examples/codeviewer/README.md

@ -1,9 +1,10 @@
MPP Code Viewer example for desktop/android written in Multiplatform Compose library.
### Running desktop application
```
./gradlew :desktop:run
```
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
### Building native desktop distribution
```

BIN
examples/codeviewer/desktop-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

23
examples/falling-balls/.run/desktop.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="desktop" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="run" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

7
examples/falling-balls/README.md

@ -0,0 +1,7 @@
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)

BIN
examples/falling-balls/desktop-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

6
examples/imageviewer/README.md

@ -1,9 +1,9 @@
An example of image gallery for remote server image viewing, based on Jetpack Compose UI library (desktop and android).
### Running desktop application
```
./gradlew :desktop:run
```
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
### Building native desktop distribution
```

BIN
examples/imageviewer/desktop-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

23
examples/intellij-plugin-with-experimental-shared-base/.run/runIde.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="runIde" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

5
examples/intellij-plugin-with-experimental-shared-base/README.md

@ -10,8 +10,9 @@ and allows sharing Compose runtime between multiple plugins
### Usage
1. Start test IDE:
* Choose the `runIde` task in the Gradle panel in Intellij;
* Or run the following command in terminal: `./gradlew runIde`;
* 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)
2. Create a new project or open any existing;
3. Select `Show Compose Demo...` from the `Tools` menu.

BIN
examples/intellij-plugin-with-experimental-shared-base/ide-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

23
examples/intellij-plugin/.run/runIde.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="runIde" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

5
examples/intellij-plugin/README.md

@ -2,7 +2,10 @@
To run the example:
1. from directory `compose-jb/examples/intellij-plugin` run command in terminal: `./gradlew runIde`
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)
2. create project or open any existing
3. from menu `Tools` select `Show Compose Demo...`

BIN
examples/intellij-plugin/ide-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

23
examples/issues/.run/desktop.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="desktop" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":desktop:run" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

6
examples/issues/README.md

@ -2,9 +2,9 @@ Github Issues viewer example written in Jetpack Compose UI library.
### Running desktop application
```
./gradlew :desktop:run
```
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
### Building native desktop distribution
```

BIN
examples/issues/desktop-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

6
examples/notepad/README.md

@ -1,9 +1,9 @@
Notepad example for desktop written in Compose for Desktop library, using Composable Window API
### Running desktop application
```
./gradlew run
```
* To run, launch command: `./gradlew run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
### Building native desktop distribution
```

BIN
examples/notepad/desktop-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

23
examples/todoapp-lite/.run/desktop.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="desktop" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":desktop:run" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

6
examples/todoapp-lite/README.md

@ -3,9 +3,9 @@ A simplified version of the [TodoApp example](https://github.com/JetBrains/compo
Supported targets: Android and Desktop.
### Running desktop application
```
./gradlew :desktop:run
```
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
### Building native desktop distribution
```

BIN
examples/todoapp-lite/desktop-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

23
examples/todoapp/.run/browser.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="browser" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":web:jsBrowserDevelopmentRun" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

23
examples/todoapp/.run/desktop.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="desktop" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":desktop:run" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

12
examples/todoapp/README.md

@ -34,9 +34,9 @@ Features:
- Pluggable UI - Compose UI for Android, Desktop and Web, SwiftUI (not Compose) for iOS
### Running desktop application
```
./gradlew :desktop:run
```
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
#### Building native desktop distribution
```
@ -49,9 +49,9 @@ Features:
Open project in Intellij IDEA or Android Studio and run "android" configuration.
### Running Web browser application
```
./gradlew :web:jsBrowserDevelopmentRun
```
* To run, launch command: `./gradlew :web:jsBrowserDevelopmentRun`
* Or choose **browser** configuration in IDE and run it.
![browser-run-configuration.png](browser-run-configuration.png)
### Running iOS application

BIN
examples/todoapp/browser-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
examples/todoapp/desktop-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

23
examples/visual-effects/.run/desktop.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="desktop" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":run" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

6
examples/visual-effects/README.md

@ -1 +1,7 @@
Several visual effects implmented with Compose Multiplatform, used in 1.0 release announce video.
### 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)

BIN
examples/visual-effects/desktop-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

23
examples/web-compose-bird/.run/browser.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="browser" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="jsBrowserRun" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

7
examples/web-compose-bird/README.md

@ -12,12 +12,13 @@
## ▶ Play
- https://theapache64.github.io/compose-bird/
- Use arrow **Up** key to fly
## 🏃 Run
```
./gradlew jsBrowserRun
```
* To run, launch command: `./gradlew jsBrowserRun`
* Or choose **browser** configuration in IDE and run it.
![browser-run-configuration.png](browser-run-configuration.png)
## 📦 Distribute

BIN
examples/web-compose-bird/browser-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

1
examples/web-compose-bird/gradle.properties

@ -1,4 +1,3 @@
kotlin.code.style=official
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
kotlin.version=1.7.10
compose.version=1.2.0-beta02

23
examples/web-compose-in-js/.run/browser.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="browser" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":jsBrowserDevelopmentRun" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

5
examples/web-compose-in-js/README.MD

@ -67,6 +67,11 @@ config.output = config.output || {};
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)
### Building and using the output
```

BIN
examples/web-compose-in-js/browser-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

23
examples/web-landing/.run/browser.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="browser" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":jsBrowserRun" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

6
examples/web-landing/README.md

@ -0,0 +1,6 @@
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)

BIN
examples/web-landing/browser-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

23
examples/web-with-react/.run/browser.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="browser" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":jsBrowserRun" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

6
examples/web-with-react/README.md

@ -19,6 +19,6 @@ It requires adding `external` declarations. For example: [ReactYoutubePlayer.kt]
Here is a good tutorial - [Using packages from NPM](https://play.kotlinlang.org/hands-on/Building%20Web%20Applications%20with%20React%20and%20Kotlin%20JS/07_Using_Packages_From_NPM)
### Running web application
```
./gradlew jsBrowserRun
```
* To run, launch command: `./gradlew :jsBrowserRun`
* Or choose **browser** configuration in IDE and run it.
![browser-run-configuration.png](browser-run-configuration.png)

BIN
examples/web-with-react/browser-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

6
examples/widgets-gallery/README.md

@ -9,9 +9,9 @@ An example of Compose application for Desktop and Android platforms,
demonstrating how to use various Material widgets.
### Running desktop application
```
./gradlew :desktop:run
```
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
### Building native desktop distribution
```

BIN
examples/widgets-gallery/desktop-run-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Loading…
Cancel
Save