Fix examples, templates (#2359)
- move screenshot into screenshots folder - add Readme, run configuration, .gitignore to web-template - fix web-compose-in-js (read versions from properties) - add global idea/ into gitignore
8
.gitignore
vendored
@@ -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
|
||||
|
||||
@@ -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.
|
||||

|
||||

|
||||
|
||||
### Building native desktop distribution
|
||||
```
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -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.
|
||||

|
||||

|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -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.
|
||||

|
||||

|
||||
|
||||
### Building native desktop distribution
|
||||
```
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -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.
|
||||

|
||||

|
||||
2. Create a new project or open any existing;
|
||||
3. Select `Show Compose Demo...` from the `Tools` menu.
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -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.
|
||||

|
||||

|
||||
2. create project or open any existing
|
||||
3. from menu `Tools` select `Show Compose Demo...`
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -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.
|
||||

|
||||

|
||||
|
||||
### Building native desktop distribution
|
||||
```
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -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.
|
||||

|
||||

|
||||
|
||||
### Building native desktop distribution
|
||||
```
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -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.
|
||||

|
||||

|
||||
|
||||
### Building native desktop distribution
|
||||
```
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -36,7 +36,7 @@ Features:
|
||||
### Running desktop application
|
||||
* To run, launch command: `./gradlew :desktop:run`
|
||||
* Or choose **desktop** configuration in IDE and run it.
|
||||

|
||||

|
||||
|
||||
#### 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.
|
||||

|
||||

|
||||
|
||||
### Running iOS application
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -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.
|
||||

|
||||

|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -1,6 +1,6 @@
|
||||
# 🐦 Compose Bird
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
<a href="https://twitter.com/theapache64" target="_blank">
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
* To run, launch command: `./gradlew jsBrowserRun`
|
||||
* Or choose **browser** configuration in IDE and run it.
|
||||

|
||||

|
||||
|
||||
## 📦 Distribute
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
@@ -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.
|
||||

|
||||

|
||||
|
||||
### Building and using the output
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -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"
|
||||
|
||||
|
||||
@@ -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.
|
||||

|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -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.
|
||||

|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -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.
|
||||

|
||||

|
||||
|
||||
### Building native desktop distribution
|
||||
```
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
15
templates/web-template/.gitignore
vendored
Normal file
@@ -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
|
||||
23
templates/web-template/.run/browser.run.xml
Normal file
@@ -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>
|
||||
4
templates/web-template/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
Compose Web Application
|
||||
|
||||
- `./gradlew jsBrowserRun` - run application in a browser
|
||||
- `./gradlew jsBrowserProductionWebpack` - produce the output in `build/distributions`
|
||||