Move to newer platform and IDEA gradle plugin

This commit is contained in:
Nikolay Igotti
2021-08-01 15:00:05 +03:00
parent 88c4e27d6e
commit 3f528d14f0
3 changed files with 6 additions and 13 deletions

View File

@@ -1,11 +1,12 @@
import org.jetbrains.compose.compose
plugins {
id("org.jetbrains.intellij") version "0.6.5"
id("org.jetbrains.intellij") version "1.1.4"
java
kotlin("jvm") version "1.5.21"
// __LATEST_COMPOSE_RELEASE_VERSION__
id("org.jetbrains.compose") version "1.0.0-alpha1-rc1"
id("idea")
}
group = "org.example"
@@ -19,17 +20,12 @@ repositories {
dependencies {
implementation(compose.desktop.currentOs)
testCompile("junit", "junit", "4.12")
testImplementation("junit", "junit", "4.12")
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version = "2021.2"
}
tasks.getByName<org.jetbrains.intellij.tasks.PatchPluginXmlTask>("patchPluginXml") {
changeNotes("""
Add change notes here.<br>
<em>most HTML tags may be used</em>""")
version.set("2021.2")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -24,7 +24,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun LazyScrollable() {
MaterialTheme {
@@ -46,9 +45,7 @@ fun LazyScrollable() {
VerticalScrollbar(
modifier = Modifier.align(Alignment.CenterEnd).fillMaxHeight(),
adapter = rememberScrollbarAdapter(
scrollState = state,
itemCount = itemCount,
averageItemSize = 37.dp // TextBox height + Spacer height
scrollState = state
)
)
}