Browse Source

fix templates after deprecating Gradle plugin dependency aliases (#5464)

Update miscellaneous projects used in pipeline

Fixes CMP-7613

## Release Notes
N/A
shish/switch-to-embeddable-compose-compiler-plugin-rebased v1.10.0-alpha04+dev3166
Victor Kropp 2 months ago committed by GitHub
parent
commit
bfd8c79447
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      ci/templates/html-library-template/build.gradle.kts
  2. 6
      ci/templates/html-library-template/gradle/libs.versions.toml
  3. 8
      ci/templates/html-library-template/settings.gradle.kts
  4. 8
      ci/templates/multiplatform-template/common/build.gradle.kts
  5. 8
      ci/templates/multiplatform-template/gradle/libs.versions.toml
  6. 8
      ci/templates/multiplatform-template/settings.gradle.kts
  7. 4
      components/AnimatedImage/library/build.gradle.kts
  8. 4
      components/SplitPane/library/build.gradle.kts
  9. 11
      components/gradle/libs.versions.toml
  10. 4
      components/resources/demo/androidApp/build.gradle.kts
  11. 12
      components/resources/demo/shared/build.gradle.kts
  12. 9
      components/resources/library/build.gradle.kts
  13. 6
      components/settings.gradle.kts
  14. 6
      components/ui-tooling-preview/demo/shared/build.gradle.kts
  15. 12
      examples/chat/gradle/libs.versions.toml
  16. 7
      examples/chat/settings.gradle.kts
  17. 14
      examples/chat/shared/build.gradle.kts
  18. 4
      tutorials/HTML/Getting_Started/README.md

9
ci/templates/html-library-template/build.gradle.kts

@ -1,6 +1,3 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
plugins { plugins {
kotlin("multiplatform") kotlin("multiplatform")
kotlin("plugin.compose") kotlin("plugin.compose")
@ -14,7 +11,7 @@ repositories {
} }
kotlin { kotlin {
js(IR) { js {
browser() browser()
binaries.executable() binaries.executable()
} }
@ -24,8 +21,8 @@ kotlin {
resources.srcDir("src/main/resources") resources.srcDir("src/main/resources")
dependencies { dependencies {
implementation(compose.web.core) implementation(libs.compose.html.core)
implementation(compose.runtime) implementation(libs.compose.runtime)
} }
} }
} }

6
ci/templates/html-library-template/gradle/libs.versions.toml

@ -0,0 +1,6 @@
[versions]
compose = "1.9.0"
[libraries]
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" }
compose-html-core = { module = "org.jetbrains.compose.html:html-core", version.ref = "compose" }

8
ci/templates/html-library-template/settings.gradle.kts

@ -10,3 +10,11 @@ pluginManagement {
id("org.jetbrains.compose").version(extra["compose.version"] as String) id("org.jetbrains.compose").version(extra["compose.version"] as String)
} }
} }
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
version("compose", extra["compose.version"].toString())
}
}
}

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

@ -12,11 +12,11 @@ kotlin {
sourceSets { sourceSets {
named("commonMain") { named("commonMain") {
dependencies { dependencies {
api(compose.runtime) api(libs.compose.runtime)
api(compose.foundation) api(libs.compose.foundation)
api(compose.material) api(libs.compose.material)
// Needed only for preview. // Needed only for preview.
implementation(compose.preview) implementation(libs.compose.ui.tooling.preview)
} }
} }
named("androidMain") { named("androidMain") {

8
ci/templates/multiplatform-template/gradle/libs.versions.toml

@ -0,0 +1,8 @@
[versions]
compose = "1.9.0"
[libraries]
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" }
compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "compose" }
compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "compose" }
compose-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "compose" }

8
ci/templates/multiplatform-template/settings.gradle.kts

@ -16,6 +16,14 @@ pluginManagement {
} }
} }
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
version("compose", extra["compose.version"].toString())
}
}
}
plugins { plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0") id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0")
} }

4
components/AnimatedImage/library/build.gradle.kts

@ -14,8 +14,8 @@ kotlin {
} }
} }
commonMain.dependencies { commonMain.dependencies {
api(compose.runtime) api(libs.compose.runtime)
api(compose.foundation) api(libs.compose.foundation)
} }
} }
} }

4
components/SplitPane/library/build.gradle.kts

@ -16,8 +16,8 @@ kotlin {
} }
commonMain.dependencies { commonMain.dependencies {
api(compose.runtime) api(libs.compose.runtime)
api(compose.foundation) api(libs.compose.foundation)
} }
} }
} }

11
components/gradle/libs.versions.toml

@ -1,3 +1,5 @@
# Version catalog has been renamed to be imported manually with overriden 'compose' version
[versions] [versions]
kotlinx-coroutines = "1.8.0" kotlinx-coroutines = "1.8.0"
androidx-appcompat = "1.6.1" androidx-appcompat = "1.6.1"
@ -5,6 +7,8 @@ androidx-activity-compose = "1.8.2"
androidx-test = "1.5.0" androidx-test = "1.5.0"
androidx-compose = "1.6.1" androidx-compose = "1.6.1"
kotlinx-browser = "0.5.0" kotlinx-browser = "0.5.0"
compose = "1.9.0"
material3 = "1.9.0"
[libraries] [libraries]
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
@ -19,3 +23,10 @@ androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-mani
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose" } androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose" }
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "androidx-compose" } androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "androidx-compose" }
androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "androidx-compose" } androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "androidx-compose" }
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" }
compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "compose" }
compose-desktop = { module = "org.jetbrains.compose.desktop:desktop", version.ref = "compose" }
compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "compose" }
compose-ui-test = { module = "org.jetbrains.compose.ui:ui-test", version.ref = "compose" }
compose-material-icons-core = { module = "org.jetbrains.compose.material:material-icons-core", version = "1.7.3" }
compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "material3" }

4
components/resources/demo/androidApp/build.gradle.kts

@ -20,8 +20,8 @@ android {
targetCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11
} }
dependencies { dependencies {
implementation(compose.ui) implementation(libs.compose.ui)
implementation(compose.foundation) implementation(libs.compose.foundation)
implementation(libs.androidx.appcompat) implementation(libs.androidx.appcompat)
implementation(libs.androidx.activity.compose) implementation(libs.androidx.activity.compose)
implementation(project(":resources:demo:shared")) implementation(project(":resources:demo:shared"))

12
components/resources/demo/shared/build.gradle.kts

@ -49,13 +49,13 @@ kotlin {
val wasmJsMain by getting val wasmJsMain by getting
commonMain.dependencies { commonMain.dependencies {
implementation(compose.runtime) implementation(libs.compose.runtime)
implementation(compose.material3) implementation(libs.compose.material3)
implementation("org.jetbrains.compose.material:material-icons-core:1.7.3") implementation(libs.compose.material.icons.core)
implementation(project(":resources:library")) implementation(project(":resources:library"))
} }
desktopMain.dependencies { desktopMain.dependencies {
implementation(compose.desktop.common) implementation(libs.compose.desktop)
} }
androidMain.dependencies { androidMain.dependencies {
implementation(libs.androidx.ui.tooling) implementation(libs.androidx.ui.tooling)
@ -87,10 +87,6 @@ android {
} }
} }
compose.experimental {
web.application {}
}
//because the dependency on the compose library is a project dependency //because the dependency on the compose library is a project dependency
compose.resources { compose.resources {
generateResClass = always generateResClass = always

9
components/resources/library/build.gradle.kts

@ -77,8 +77,8 @@ kotlin {
val commonMain by getting { val commonMain by getting {
dependencies { dependencies {
implementation(compose.runtime) implementation(libs.compose.runtime)
implementation(compose.foundation) implementation(libs.compose.foundation)
implementation(libs.kotlinx.coroutines.core) implementation(libs.kotlinx.coroutines.core)
} }
} }
@ -86,9 +86,8 @@ kotlin {
dependencies { dependencies {
implementation(kotlin("test")) implementation(kotlin("test"))
implementation(libs.kotlinx.coroutines.test) implementation(libs.kotlinx.coroutines.test)
implementation(compose.material3) implementation(libs.compose.material3)
@OptIn(ExperimentalComposeLibrary::class) implementation(libs.compose.ui.test)
implementation(compose.uiTest)
} }
} }
val blockingMain by creating { val blockingMain by creating {

6
components/settings.gradle.kts

@ -33,6 +33,12 @@ dependencyResolutionManagement {
mavenCentral() mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
} }
versionCatalogs {
create("libs") {
version("compose", extra["compose.version"].toString())
}
}
} }
include(":SplitPane:library") include(":SplitPane:library")

6
components/ui-tooling-preview/demo/shared/build.gradle.kts

@ -50,13 +50,13 @@ kotlin {
sourceSets { sourceSets {
commonMain.dependencies { commonMain.dependencies {
implementation(compose.runtime) implementation(libs.compose.runtime)
implementation(compose.material3) implementation(libs.compose.material3)
implementation(project(":ui-tooling-preview:library")) implementation(project(":ui-tooling-preview:library"))
} }
val desktopMain by getting val desktopMain by getting
desktopMain.dependencies { desktopMain.dependencies {
implementation(compose.desktop.common) implementation(libs.compose.desktop)
} }
} }
} }

12
examples/chat/gradle/libs.versions.toml

@ -0,0 +1,12 @@
[versions]
compose = "1.9.1"
kotlinxDatetime = "0.5.0"
[libraries]
compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "compose" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDatetime" }
compose-desktop = { module = "org.jetbrains.compose.desktop:desktop", version.ref = "compose" }
material = { module = "org.jetbrains.compose.material:material", version.ref = "compose" }
material-icons-core = { module = "org.jetbrains.compose.material:material-icons-core", version = "1.7.3" }
compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "compose" }
components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "compose"}

7
examples/chat/settings.gradle.kts

@ -20,6 +20,13 @@ pluginManagement {
id("org.jetbrains.compose").version(composeVersion) id("org.jetbrains.compose").version(composeVersion)
} }
} }
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
version("compose", extra["compose.version"].toString())
}
}
}
plugins { plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0") id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0")

14
examples/chat/shared/build.gradle.kts

@ -54,12 +54,12 @@ kotlin {
} }
val commonMain by getting { val commonMain by getting {
dependencies { dependencies {
implementation(compose.ui) implementation(libs.compose.ui)
implementation(compose.foundation) implementation(libs.compose.foundation)
implementation(compose.material) implementation(libs.material)
implementation(compose.components.resources) implementation(libs.components.resources)
implementation("org.jetbrains.compose.material:material-icons-core:1.6.11") implementation(libs.material.icons.core)
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0") implementation(libs.kotlinx.datetime)
} }
} }
val androidMain by getting { val androidMain by getting {
@ -83,7 +83,7 @@ kotlin {
} }
val desktopMain by getting { val desktopMain by getting {
dependencies { dependencies {
implementation(compose.desktop.common) implementation(libs.compose.desktop)
} }
} }

4
tutorials/HTML/Getting_Started/README.md

@ -56,8 +56,8 @@ kotlin {
sourceSets { sourceSets {
val jsMain by getting { val jsMain by getting {
dependencies { dependencies {
implementation(compose.html.core) implementation("org.jetbrains.compose.html:html-core:1.9.0")
implementation(compose.runtime) implementation("org.jetbrains.compose:compose-runtime:1.9.0")
} }
} }
} }

Loading…
Cancel
Save