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 import org.jetbrains.compose.compose
plugins { plugins {
id("org.jetbrains.intellij") version "0.6.5" id("org.jetbrains.intellij") version "1.1.4"
java java
kotlin("jvm") version "1.5.21" kotlin("jvm") version "1.5.21"
// __LATEST_COMPOSE_RELEASE_VERSION__ // __LATEST_COMPOSE_RELEASE_VERSION__
id("org.jetbrains.compose") version "1.0.0-alpha1-rc1" id("org.jetbrains.compose") version "1.0.0-alpha1-rc1"
id("idea")
} }
group = "org.example" group = "org.example"
@ -19,17 +20,12 @@ repositories {
dependencies { dependencies {
implementation(compose.desktop.currentOs) implementation(compose.desktop.currentOs)
testCompile("junit", "junit", "4.12") testImplementation("junit", "junit", "4.12")
} }
// See https://github.com/JetBrains/gradle-intellij-plugin/ // See https://github.com/JetBrains/gradle-intellij-plugin/
intellij { intellij {
version = "2021.2" version.set("2021.2")
}
tasks.getByName<org.jetbrains.intellij.tasks.PatchPluginXmlTask>("patchPluginXml") {
changeNotes("""
Add change notes here.<br>
<em>most HTML tags may be used</em>""")
} }
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { 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 distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
@OptIn(ExperimentalFoundationApi::class)
@Composable @Composable
fun LazyScrollable() { fun LazyScrollable() {
MaterialTheme { MaterialTheme {
@ -46,9 +45,7 @@ fun LazyScrollable() {
VerticalScrollbar( VerticalScrollbar(
modifier = Modifier.align(Alignment.CenterEnd).fillMaxHeight(), modifier = Modifier.align(Alignment.CenterEnd).fillMaxHeight(),
adapter = rememberScrollbarAdapter( adapter = rememberScrollbarAdapter(
scrollState = state, scrollState = state
itemCount = itemCount,
averageItemSize = 37.dp // TextBox height + Spacer height
) )
) )
} }

Loading…
Cancel
Save