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") optIn("kotlin.RequiresOptIn")
} }
} }
val jvmMain by getting { jvmMain.dependencies {
dependencies { implementation(compose.desktop.currentOs)
implementation(compose.desktop.currentOs) implementation(project(":AnimatedImage:library"))
implementation(project(":AnimatedImage:library"))
}
} }
} }
} }

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

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

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

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

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

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

5
components/gradle.properties

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

15
components/gradle/libs.versions.toml

@ -1,7 +1,16 @@
[versions] [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] [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" }
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 distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

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

@ -19,10 +19,10 @@ android {
targetCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11
} }
dependencies { dependencies {
implementation(compose.ui)
implementation(compose.foundation)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.activity.compose)
implementation(project(":resources:demo:shared")) 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 { kotlin {
jvm() jvm()
sourceSets { sourceSets {
val jvmMain by getting { jvmMain.dependencies {
dependencies { implementation(compose.desktop.currentOs)
implementation(compose.desktop.currentOs) implementation(project(":resources:demo:shared"))
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 import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
plugins { plugins {
@ -8,8 +7,6 @@ plugins {
} }
kotlin { kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
androidTarget { androidTarget {
compilations.all { compilations.all {
kotlinOptions { kotlinOptions {
@ -59,17 +56,14 @@ kotlin {
optIn("org.jetbrains.compose.resources.ExperimentalResourceApi") optIn("org.jetbrains.compose.resources.ExperimentalResourceApi")
} }
} }
val commonMain by getting { commonMain.dependencies {
dependencies { implementation(compose.runtime)
implementation(compose.runtime) implementation(compose.material3)
implementation(compose.material3) implementation(project(":resources:library"))
implementation(project(":resources:library"))
}
} }
val desktopMain by getting { val desktopMain by getting
dependencies { desktopMain.dependencies {
implementation(compose.desktop.common) implementation(compose.desktop.common)
}
} }
} }
} }
@ -89,8 +83,3 @@ android {
compose.experimental { compose.experimental {
web.application {} 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 val composeVersion = extra["compose.version"] as String
kotlin { kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
jvm("desktop") jvm("desktop")
androidTarget { androidTarget {
publishLibraryVariants("release") publishLibraryVariants("release")
@ -48,6 +46,7 @@ kotlin {
macosX64() macosX64()
macosArm64() macosArm64()
applyDefaultHierarchyTemplate()
sourceSets { sourceSets {
all { all {
languageSettings { languageSettings {
@ -75,8 +74,8 @@ kotlin {
} }
val commonTest by getting { val commonTest by getting {
dependencies { dependencies {
implementation(libs.kotlinx.coroutines.test)
implementation(kotlin("test")) implementation(kotlin("test"))
implementation(libs.kotlinx.coroutines.test)
implementation(compose.material3) implementation(compose.material3)
@OptIn(ExperimentalComposeLibrary::class) @OptIn(ExperimentalComposeLibrary::class)
implementation(compose.uiTest) implementation(compose.uiTest)
@ -96,9 +95,6 @@ kotlin {
} }
val jvmAndAndroidMain by creating { val jvmAndAndroidMain by creating {
dependsOn(blockingMain) dependsOn(blockingMain)
dependencies {
implementation(compose.material3)
}
} }
val jvmAndAndroidTest by creating { val jvmAndAndroidTest by creating {
dependsOn(blockingTest) dependsOn(blockingTest)
@ -112,8 +108,6 @@ kotlin {
dependsOn(jvmAndAndroidTest) dependsOn(jvmAndAndroidTest)
dependencies { dependencies {
implementation(compose.desktop.currentOs) implementation(compose.desktop.currentOs)
implementation(compose.desktop.uiTestJUnit4)
implementation(libs.kotlinx.coroutines.swing)
} }
} }
val androidMain by getting { val androidMain by getting {
@ -122,10 +116,10 @@ kotlin {
val androidInstrumentedTest by getting { val androidInstrumentedTest by getting {
dependsOn(jvmAndAndroidTest) dependsOn(jvmAndAndroidTest)
dependencies { dependencies {
implementation("androidx.test:core:1.5.0") implementation(libs.androidx.test.core)
implementation("androidx.compose.ui:ui-test-manifest:1.5.4") implementation(libs.androidx.compose.ui.test)
implementation("androidx.compose.ui:ui-test:1.5.4") implementation(libs.androidx.compose.ui.test.manifest)
implementation("androidx.compose.ui:ui-test-junit4:1.5.4") implementation(libs.androidx.compose.ui.test.junit4)
} }
} }
val androidUnitTest by getting { val androidUnitTest by getting {

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

@ -6,11 +6,9 @@ plugins {
kotlin { kotlin {
jvm() jvm()
sourceSets { sourceSets {
val jvmMain by getting { jvmMain.dependencies {
dependencies { implementation(compose.desktop.currentOs)
implementation(compose.desktop.currentOs) implementation(project(":ui-tooling-preview:demo:shared"))
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 { plugins {
kotlin("multiplatform") kotlin("multiplatform")
id("com.android.library") id("com.android.library")
@ -7,8 +5,6 @@ plugins {
} }
kotlin { kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
androidTarget { androidTarget {
compilations.all { compilations.all {
kotlinOptions { kotlinOptions {
@ -48,17 +44,14 @@ kotlin {
} }
sourceSets { sourceSets {
val commonMain by getting { commonMain.dependencies {
dependencies { implementation(compose.runtime)
implementation(compose.runtime) implementation(compose.material3)
implementation(compose.material3) implementation(project(":ui-tooling-preview:library"))
implementation(project(":ui-tooling-preview:library"))
}
} }
val desktopMain by getting { val desktopMain by getting
dependencies { desktopMain.dependencies {
implementation(compose.desktop.common) implementation(compose.desktop.common)
}
} }
} }
} }
@ -78,8 +71,3 @@ android {
compose.experimental { compose.experimental {
web.application {} 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 val composeVersion = extra["compose.version"] as String
kotlin { kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
jvm("desktop") jvm("desktop")
androidTarget { androidTarget {
publishLibraryVariants("release") publishLibraryVariants("release")

Loading…
Cancel
Save