Browse Source

Update dependency versions and refactor build configs (#4215)

ok/repr-ios-release_chat-mpp-1.6.0beta01
Konstantin 3 months ago committed by GitHub
parent
commit
18de77e0bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      components/AnimatedImage/demo/build.gradle.kts
  2. 8
      components/AnimatedImage/library/build.gradle.kts
  3. 10
      components/SplitPane/demo/build.gradle.kts
  4. 8
      components/SplitPane/library/build.gradle.kts
  5. 5
      components/gradle.properties
  6. 15
      components/gradle/libs.versions.toml
  7. 2
      components/gradle/wrapper/gradle-wrapper.properties
  8. 8
      components/resources/demo/androidApp/build.gradle.kts
  9. 8
      components/resources/demo/desktopApp/build.gradle.kts
  10. 25
      components/resources/demo/shared/build.gradle.kts
  11. 18
      components/resources/library/build.gradle.kts
  12. 8
      components/ui-tooling-preview/demo/desktopApp/build.gradle.kts
  13. 26
      components/ui-tooling-preview/demo/shared/build.gradle.kts
  14. 2
      components/ui-tooling-preview/library/build.gradle.kts

8
components/AnimatedImage/demo/build.gradle.kts

@ -11,11 +11,9 @@ kotlin {
optIn("kotlin.RequiresOptIn")
}
}
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":AnimatedImage:library"))
}
jvmMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":AnimatedImage:library"))
}
}
}

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

@ -12,11 +12,9 @@ kotlin {
optIn("kotlin.RequiresOptIn")
}
}
val commonMain by getting {
dependencies {
api(compose.runtime)
api(compose.foundation)
}
commonMain.dependencies {
api(compose.runtime)
api(compose.foundation)
}
}
}

10
components/SplitPane/demo/build.gradle.kts

@ -1,5 +1,3 @@
import org.jetbrains.compose.compose
plugins {
kotlin("multiplatform")
id("org.jetbrains.compose")
@ -14,11 +12,9 @@ kotlin {
}
}
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":SplitPane:library"))
}
jvmMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":SplitPane:library"))
}
}
}

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

@ -14,11 +14,9 @@ kotlin {
}
}
val commonMain by getting {
dependencies {
api(compose.runtime)
api(compose.foundation)
}
commonMain.dependencies {
api(compose.runtime)
api(compose.foundation)
}
}
}

5
components/gradle.properties

@ -1,13 +1,13 @@
#Gradle
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
org.gradle.caching=true
#org.gradle.configuration-cache=true //stable since kotlin 1.9.20
org.gradle.configuration-cache=true
#Android
android.useAndroidX=true
#Versions
kotlin.version=1.9.21
kotlin.version=1.9.22
compose.version=1.6.0-dev1397
agp.version=8.1.2
@ -23,5 +23,4 @@ kotlin.code.style=official
kotlin.js.compiler=ir
kotlin.js.webpack.major.version=4
kotlin.native.useEmbeddableCompilerJar=true
kotlin.native.binary.memoryModel=experimental
xcodeproj=./resources/demo/iosApp

15
components/gradle/libs.versions.toml

@ -1,7 +1,16 @@
[versions]
kotlinx-coroutines = "1.8.0-RC"
kotlinx-coroutines = "1.8.0-RC2"
androidx-appcompat = "1.6.1"
androidx-activity-compose = "1.8.2"
androidx-test = "1.5.0"
androidx-compose = "1.6.0"
[libraries]
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test" }
androidx-compose-ui-test = { module = "androidx.compose.ui:ui-test", version.ref = "androidx-compose" }
androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-compose" }
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose" }

2
components/gradle/wrapper/gradle-wrapper.properties vendored

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

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

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

8
components/resources/demo/desktopApp/build.gradle.kts

@ -6,11 +6,9 @@ plugins {
kotlin {
jvm()
sourceSets {
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":resources:demo:shared"))
}
jvmMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":resources:demo:shared"))
}
}
}

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

@ -1,4 +1,3 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
plugins {
@ -8,8 +7,6 @@ plugins {
}
kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
androidTarget {
compilations.all {
kotlinOptions {
@ -59,17 +56,14 @@ kotlin {
optIn("org.jetbrains.compose.resources.ExperimentalResourceApi")
}
}
val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation(compose.material3)
implementation(project(":resources:library"))
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.material3)
implementation(project(":resources:library"))
}
val desktopMain by getting {
dependencies {
implementation(compose.desktop.common)
}
val desktopMain by getting
desktopMain.dependencies {
implementation(compose.desktop.common)
}
}
}
@ -89,8 +83,3 @@ android {
compose.experimental {
web.application {}
}
// TODO: remove this block after we update on a newer kotlin. Currently there is an error: `error:0308010C:digital envelope routines::unsupported`
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
}

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

@ -12,8 +12,6 @@ plugins {
val composeVersion = extra["compose.version"] as String
kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
jvm("desktop")
androidTarget {
publishLibraryVariants("release")
@ -48,6 +46,7 @@ kotlin {
macosX64()
macosArm64()
applyDefaultHierarchyTemplate()
sourceSets {
all {
languageSettings {
@ -75,8 +74,8 @@ kotlin {
}
val commonTest by getting {
dependencies {
implementation(libs.kotlinx.coroutines.test)
implementation(kotlin("test"))
implementation(libs.kotlinx.coroutines.test)
implementation(compose.material3)
@OptIn(ExperimentalComposeLibrary::class)
implementation(compose.uiTest)
@ -96,9 +95,6 @@ kotlin {
}
val jvmAndAndroidMain by creating {
dependsOn(blockingMain)
dependencies {
implementation(compose.material3)
}
}
val jvmAndAndroidTest by creating {
dependsOn(blockingTest)
@ -112,8 +108,6 @@ kotlin {
dependsOn(jvmAndAndroidTest)
dependencies {
implementation(compose.desktop.currentOs)
implementation(compose.desktop.uiTestJUnit4)
implementation(libs.kotlinx.coroutines.swing)
}
}
val androidMain by getting {
@ -122,10 +116,10 @@ kotlin {
val androidInstrumentedTest by getting {
dependsOn(jvmAndAndroidTest)
dependencies {
implementation("androidx.test:core:1.5.0")
implementation("androidx.compose.ui:ui-test-manifest:1.5.4")
implementation("androidx.compose.ui:ui-test:1.5.4")
implementation("androidx.compose.ui:ui-test-junit4:1.5.4")
implementation(libs.androidx.test.core)
implementation(libs.androidx.compose.ui.test)
implementation(libs.androidx.compose.ui.test.manifest)
implementation(libs.androidx.compose.ui.test.junit4)
}
}
val androidUnitTest by getting {

8
components/ui-tooling-preview/demo/desktopApp/build.gradle.kts

@ -6,11 +6,9 @@ plugins {
kotlin {
jvm()
sourceSets {
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":ui-tooling-preview:demo:shared"))
}
jvmMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":ui-tooling-preview:demo:shared"))
}
}
}

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

@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
plugins {
kotlin("multiplatform")
id("com.android.library")
@ -7,8 +5,6 @@ plugins {
}
kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
androidTarget {
compilations.all {
kotlinOptions {
@ -48,17 +44,14 @@ kotlin {
}
sourceSets {
val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation(compose.material3)
implementation(project(":ui-tooling-preview:library"))
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.material3)
implementation(project(":ui-tooling-preview:library"))
}
val desktopMain by getting {
dependencies {
implementation(compose.desktop.common)
}
val desktopMain by getting
desktopMain.dependencies {
implementation(compose.desktop.common)
}
}
}
@ -78,8 +71,3 @@ android {
compose.experimental {
web.application {}
}
// TODO: remove this block after we update on a newer kotlin. Currently there is an error: `error:0308010C:digital envelope routines::unsupported`
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
}

2
components/ui-tooling-preview/library/build.gradle.kts

@ -9,8 +9,6 @@ plugins {
val composeVersion = extra["compose.version"] as String
kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
jvm("desktop")
androidTarget {
publishLibraryVariants("release")

Loading…
Cancel
Save