Browse Source

Update dependency versions and refactor build configs (#4215)

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

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

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

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

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

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

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

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

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

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

13
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" }
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")
}
}

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

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

17
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,19 +56,16 @@ kotlin {
optIn("org.jetbrains.compose.resources.ExperimentalResourceApi")
}
}
val commonMain by getting {
dependencies {
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.material3)
implementation(project(":resources:library"))
}
}
val desktopMain by getting {
dependencies {
val desktopMain by getting
desktopMain.dependencies {
implementation(compose.desktop.common)
}
}
}
}
android {
@ -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 {

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

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

18
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,19 +44,16 @@ kotlin {
}
sourceSets {
val commonMain by getting {
dependencies {
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.material3)
implementation(project(":ui-tooling-preview:library"))
}
}
val desktopMain by getting {
dependencies {
val desktopMain by getting
desktopMain.dependencies {
implementation(compose.desktop.common)
}
}
}
}
android {
@ -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