Browse Source

Move to newer platform and IDEA gradle plugin

pull/966/head
Nikolay Igotti 3 years ago
parent
commit
3f528d14f0
  1. 12
      examples/intelliJPlugin/build.gradle.kts
  2. 2
      examples/intelliJPlugin/gradle/wrapper/gradle-wrapper.properties
  3. 5
      examples/intelliJPlugin/src/main/kotlin/com/jetbrains/compose/widgets/LazyScrollable.kt

12
examples/intelliJPlugin/build.gradle.kts

@ -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> {

2
examples/intelliJPlugin/gradle/wrapper/gradle-wrapper.properties vendored

@ -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

5
examples/intelliJPlugin/src/main/kotlin/com/jetbrains/compose/widgets/LazyScrollable.kt

@ -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
)
)
}

Loading…
Cancel
Save