Browse Source

Migrate to Compose 0.1.0-m1-build62

pull/49/head
Igor Demin 4 years ago
parent
commit
3b583678c7
  1. 4
      examples/codeviewer/android/src/main/assets/data/EditorView.kt
  2. 6
      examples/codeviewer/build.gradle.kts
  3. 2
      examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/CodeViewerView.kt
  4. 4
      examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/EditorEmptyView.kt
  5. 4
      examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/EditorTabsView.kt
  6. 4
      examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/EditorView.kt
  7. 4
      examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/filetree/FileTreeView.kt
  8. 4
      examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/statusbar/StatusBar.kt
  9. 8
      examples/codeviewer/common/src/desktopMain/kotlin/org/jetbrains/codeviewer/platform/Scrollbar.kt
  10. 2
      examples/imageviewer/build.gradle.kts
  11. 4
      examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/MainScreen.kt
  12. 2
      examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt
  13. 3
      examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/Main.kt
  14. 2
      templates/desktop-template/build.gradle.kts
  15. 2
      templates/multiplatform-template/build.gradle.kts

4
examples/codeviewer/android/src/main/assets/data/EditorView.kt

@ -4,13 +4,13 @@
package org.jetbrains.codeviewer.ui.editor
import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.Text
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.AmbientContentColor
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.key

6
examples/codeviewer/build.gradle.kts

@ -8,9 +8,7 @@ buildscript {
}
dependencies {
// TODO/migrateToMaster 0.1.0-dev104 is built from "unmerged" branch,
// replace it by version from androidx-master-dev when scrollbars will be merged
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-m1-build57")
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-m1-build62")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}
@ -18,8 +16,6 @@ buildscript {
allprojects {
repositories {
// TODO: remove after new build is published
mavenLocal()
google()
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")

2
examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/CodeViewerView.kt

@ -3,9 +3,9 @@ package org.jetbrains.codeviewer.ui
import androidx.compose.animation.animate
import androidx.compose.animation.core.Spring.StiffnessLow
import androidx.compose.animation.core.SpringSpec
import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.material.AmbientContentColor
import androidx.compose.material.Icon
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack

4
examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/EditorEmptyView.kt

@ -1,12 +1,12 @@
package org.jetbrains.codeviewer.ui.editor
import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.Text
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material.AmbientContentColor
import androidx.compose.material.Icon
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Code
import androidx.compose.runtime.Composable

4
examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/EditorTabsView.kt

@ -1,16 +1,16 @@
package org.jetbrains.codeviewer.ui.editor
import androidx.compose.animation.animate
import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.ScrollableRow
import androidx.compose.foundation.Text
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.AmbientContentColor
import androidx.compose.material.Icon
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.runtime.Composable

4
examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/EditorView.kt

@ -1,12 +1,12 @@
package org.jetbrains.codeviewer.ui.editor
import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.Text
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.AmbientContentColor
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.key

4
examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/filetree/FileTreeView.kt

@ -1,13 +1,13 @@
package org.jetbrains.codeviewer.ui.filetree
import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.Text
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumnFor
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.AmbientContentColor
import androidx.compose.material.Icon
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.*
import androidx.compose.runtime.Composable

4
examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/statusbar/StatusBar.kt

@ -1,9 +1,9 @@
package org.jetbrains.codeviewer.ui.statusbar
import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.Text
import androidx.compose.foundation.layout.*
import androidx.compose.material.AmbientContentColor
import androidx.compose.material.Slider
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Providers
import androidx.compose.ui.Alignment

8
examples/codeviewer/common/src/desktopMain/kotlin/org/jetbrains/codeviewer/platform/Scrollbar.kt

@ -13,8 +13,8 @@ actual fun VerticalScrollbar(
modifier: Modifier,
scrollState: ScrollState
) = androidx.compose.foundation.VerticalScrollbar(
modifier,
adapter = rememberScrollbarAdapter(scrollState)
rememberScrollbarAdapter(scrollState),
modifier
)
@OptIn(ExperimentalFoundationApi::class)
@ -25,6 +25,6 @@ actual fun VerticalScrollbar(
itemCount: Int,
averageItemSize: Dp
) = androidx.compose.foundation.VerticalScrollbar(
modifier,
adapter = rememberScrollbarAdapter(scrollState, itemCount, averageItemSize)
rememberScrollbarAdapter(scrollState, itemCount, averageItemSize),
modifier
)

2
examples/imageviewer/build.gradle.kts

@ -10,7 +10,7 @@ buildscript {
}
dependencies {
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-m1-build57")
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-m1-build62")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}

4
examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/MainScreen.kt

@ -288,9 +288,9 @@ fun setScrollableArea(content: ContentState) {
}
}
VerticalScrollbar(
adapter = rememberScrollbarAdapter(stateVertical),
modifier = Modifier.align(Alignment.CenterEnd)
.fillMaxHeight(),
adapter = rememberScrollbarAdapter(stateVertical)
.fillMaxHeight()
)
}
}

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

@ -10,7 +10,7 @@ object Deps {
}
object Compose {
private const val VERSION = "0.1.0-m1-build57"
private const val VERSION = "0.1.0-m1-build62"
const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION"
}
}

3
examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/Main.kt

@ -2,6 +2,7 @@ package example.todo.desktop
import androidx.compose.desktop.AppWindow
import androidx.compose.desktop.DesktopTheme
import androidx.compose.desktop.Window
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
@ -23,7 +24,7 @@ fun main() {
val lifecycle = LifecycleRegistry()
lifecycle.resume()
AppWindow("Todo").show {
Window("Todo") {
Surface(modifier = Modifier.fillMaxSize()) {
MaterialTheme {
DesktopTheme {

2
templates/desktop-template/build.gradle.kts

@ -3,7 +3,7 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
kotlin("jvm") version "1.4.0"
id("org.jetbrains.compose") version (System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "0.1.0-m1-build57")
id("org.jetbrains.compose") version (System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "0.1.0-m1-build62")
}
repositories {

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

@ -1,5 +1,5 @@
buildscript {
val composeVersion = System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "0.1.0-m1-build57"
val composeVersion = System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "0.1.0-m1-build62"
repositories {
// TODO: remove after new build is published

Loading…
Cancel
Save