Skip to content

Commit 242ec6b

Browse files
committed
Cleanup samples and adjust for rc5
1 parent 4819120 commit 242ec6b

File tree

197 files changed

+53
-43
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+53
-43
lines changed

README.md

Lines changed: 4 additions & 4 deletions

compose/frameworks/support

compose/prebuilts/androidx/internal

Submodule internal updated from 818a882 to f37dc6b

examples/falling_balls_with_web/build.gradle.kts renamed to examples/falling-balls-web/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
33

44
plugins {
55
kotlin("multiplatform") version "1.5.21"
6-
id("org.jetbrains.compose") version "1.0.0-alpha1-rc1"
6+
id("org.jetbrains.compose") version "1.0.0-alpha1-rc5"
77
}
88

99
version = "1.0-SNAPSHOT"
File renamed without changes.
File renamed without changes.

examples/falling_balls/build.gradle.kts renamed to examples/falling-balls/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
// __KOTLIN_COMPOSE_VERSION__
77
kotlin("jvm") version "1.5.21"
88
// __LATEST_COMPOSE_RELEASE_VERSION__
9-
id("org.jetbrains.compose") version "1.0.0-alpha1-rc1"
9+
id("org.jetbrains.compose") version "1.0.0-alpha1-rc5"
1010
}
1111

1212
group = "me.user"

examples/imageviewer/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ buildscript {
77

88
dependencies {
99
// __LATEST_COMPOSE_RELEASE_VERSION__
10-
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0-alpha1-rc3")
11-
classpath("com.android.tools.build:gradle:7.0.0")
10+
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0-alpha1-rc5")
11+
classpath("com.android.tools.build:gradle:4.1.0")
1212
classpath(kotlin("gradle-plugin", version = "1.5.21"))
1313
}
1414
}

examples/intelliJPlugin/build.gradle.kts renamed to examples/intellij-plugin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
java
66
kotlin("jvm") version "1.5.21"
77
// __LATEST_COMPOSE_RELEASE_VERSION__
8-
id("org.jetbrains.compose") version "1.0.0-alpha1-rc1"
8+
id("org.jetbrains.compose") version "1.0.0-alpha1-rc5"
99
id("idea")
1010
}
1111

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
File renamed without changes.

examples/issues/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ buildscript {
88

99
dependencies {
1010
// __LATEST_COMPOSE_RELEASE_VERSION__
11-
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0-alpha1-rc1")
12-
classpath("com.android.tools.build:gradle:7.0.0")
11+
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0-alpha1-rc5")
12+
classpath("com.android.tools.build:gradle:4.1.0")
1313
// __KOTLIN_COMPOSE_VERSION__
1414
classpath(kotlin("gradle-plugin", version = "1.5.21"))
1515
}

examples/notepad/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
// __KOTLIN_COMPOSE_VERSION__
66
kotlin("jvm") version "1.5.21"
77
// __LATEST_COMPOSE_RELEASE_VERSION__
8-
id("org.jetbrains.compose") version ("1.0.0-alpha1-rc1")
8+
id("org.jetbrains.compose") version ("1.0.0-alpha1-rc5")
99
}
1010

1111
repositories {

examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ object Deps {
1313

1414
object Compose {
1515
// __LATEST_COMPOSE_RELEASE_VERSION__
16-
private const val VERSION = "1.0.0-alpha1-rc3"
16+
private const val VERSION = "1.0.0-alpha1-rc5"
1717
const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION"
1818
}
1919
}

examples/web-compose-bird/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
kotlin("multiplatform") version "1.5.21"
3-
id("org.jetbrains.compose") version "1.0.0-alpha1-rc1"
3+
id("org.jetbrains.compose") version "1.0.0-alpha1-rc5"
44
}
55
group = "com.theapache64.composebird"
66
version = "1.0.0-alpha01"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

examples/web-getting-started/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
kotlin("multiplatform") version "1.5.21"
3-
id("org.jetbrains.compose") version "1.0.0-alpha1-rc1"
3+
id("org.jetbrains.compose") version "1.0.0-alpha1-rc5"
44
}
55

66
repositories {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
File renamed without changes.

examples/web_landing/build.gradle.kts renamed to examples/web-landing/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
kotlin("multiplatform") version "1.5.21"
3-
id("org.jetbrains.compose") version "1.0.0-alpha1-rc1"
3+
id("org.jetbrains.compose") version "1.0.0-alpha1-rc5"
44
}
55

66
repositories {
File renamed without changes.
File renamed without changes.

examples/web-with-react/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
kotlin("multiplatform") version "1.5.21"
3-
id("org.jetbrains.compose") version "1.0.0-alpha1-rc1"
3+
id("org.jetbrains.compose") version "1.0.0-alpha1-rc5"
44
}
55

66
repositories {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

examples/widgetsgallery/build.gradle.kts renamed to examples/widgets-gallery/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88

99
dependencies {
1010
// __LATEST_COMPOSE_RELEASE_VERSION__
11-
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0-alpha1-rc1")
11+
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0-alpha1-rc5")
1212
classpath("com.android.tools.build:gradle:7.0.0")
1313
// __KOTLIN_COMPOSE_VERSION__
1414
classpath(kotlin("gradle-plugin", version = "1.5.21"))
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package org.jetbrains.compose.demo.widgets.platform
33
import androidx.compose.ui.ExperimentalComposeUiApi
44
import androidx.compose.ui.Modifier
55
import androidx.compose.ui.geometry.Offset
6-
import androidx.compose.ui.input.pointer.awtCursor
6+
import androidx.compose.ui.input.pointer.PointerIcon
77
import androidx.compose.ui.input.pointer.pointerIcon
88
import androidx.compose.ui.input.pointer.pointerMoveFilter
99
import java.awt.Cursor
@@ -16,4 +16,4 @@ actual fun Modifier.pointerMoveFilter(
1616

1717
@OptIn(ExperimentalComposeUiApi::class)
1818
actual fun Modifier.cursorForHorizontalResize(): Modifier =
19-
pointerIcon(awtCursor(Cursor(Cursor.E_RESIZE_CURSOR)))
19+
pointerIcon(PointerIcon(Cursor(Cursor.E_RESIZE_CURSOR)))
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
File renamed without changes.

templates/desktop-template/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
// __KOTLIN_COMPOSE_VERSION__
66
kotlin("jvm") version "1.5.21"
77
// __LATEST_COMPOSE_RELEASE_VERSION__
8-
id("org.jetbrains.compose") version (System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "1.0.0-alpha1-rc2")
8+
id("org.jetbrains.compose") version (System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "1.0.0-alpha1-rc5")
99
}
1010

1111
repositories {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

templates/multiplatform-template/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
// __LATEST_COMPOSE_RELEASE_VERSION__
3-
val composeVersion = System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "1.0.0-alpha1-rc2"
3+
val composeVersion = System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "1.0.0-alpha1-rc5"
44

55
repositories {
66
mavenCentral()

templates/multiplatform-template/common/build.gradle.kts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,8 @@ kotlin {
1616
api(compose.runtime)
1717
api(compose.foundation)
1818
api(compose.material)
19-
}
20-
}
21-
named("desktopMain") {
22-
dependencies {
23-
// Note, if you develop a library, you should use compose.desktop.common.
24-
// compose.desktop.currentOs should be used in launcher-sourceSet
25-
// (in a separate module for demo project and in testMain).
26-
// With compose.desktop.common you will also lose @Preview functionality
27-
api(compose.desktop.currentOs)
19+
// Needed only for preview.
20+
implementation(compose.preview)
2821
}
2922
}
3023
named("androidMain") {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

templates/web-template/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
// __KOTLIN_COMPOSE_VERSION__
66
kotlin("multiplatform") version "1.5.21"
77
// __LATEST_COMPOSE_RELEASE_VERSION__
8-
id("org.jetbrains.compose") version ("1.0.0-alpha1-rc1")
8+
id("org.jetbrains.compose") version ("1.0.0-alpha1-rc5")
99
}
1010

1111
repositories {
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1+
import androidx.compose.runtime.*
2+
import org.jetbrains.compose.web.dom.Button
13
import org.jetbrains.compose.web.dom.Div
24
import org.jetbrains.compose.web.dom.Text
35
import org.jetbrains.compose.web.renderComposable
46

57
fun main() {
68
renderComposable(rootElementId = "root") {
7-
Div {
8-
Text("This is a template!")
9+
Body()
10+
}
11+
}
12+
13+
@Composable
14+
fun Body() {
15+
var counter by remember { mutableStateOf(0) }
16+
Div {
17+
Text("Clicked: ${counter}")
18+
}
19+
Button(
20+
attrs = {
21+
onClick { _ ->
22+
counter++
23+
}
924
}
25+
) {
26+
Text("Click")
1027
}
1128
}

0 commit comments

Comments
 (0)