From f16625a1a7ecd16eae808761497618faceae8f6d Mon Sep 17 00:00:00 2001 From: Alexander Popoff Date: Wed, 14 Aug 2024 22:40:39 +0300 Subject: [PATCH] Use Kotlin Wrappers version catalog --- gradle.properties | 2 +- mui-kotlin/build.gradle.kts | 6 +-- package-lock.json | 76 ++++++++++++++++++++++++++++--------- playground/build.gradle.kts | 9 ++--- settings.gradle.kts | 7 ++++ 5 files changed, 72 insertions(+), 28 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3e935b749..0b15277e4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # Deps kotlin.version=2.0.0 -kotlin-wrappers.version=1.0.0-pre.786 +kotlin.wrappers.version=0.0.1-pre.791 kfc.version=8.7.0 seskar.version=3.6.0 # MUI Deps diff --git a/mui-kotlin/build.gradle.kts b/mui-kotlin/build.gradle.kts index ee6cb513e..6e886097c 100644 --- a/mui-kotlin/build.gradle.kts +++ b/mui-kotlin/build.gradle.kts @@ -4,7 +4,6 @@ plugins { `mui-declarations` } -val kotlinWrappersVersion = property("kotlin-wrappers.version") as String val seskarVersion = property("seskar.version") as String dependencies { @@ -18,7 +17,6 @@ dependencies { jsMainImplementation("io.github.turansky.seskar:seskar-core:$seskarVersion") - jsMainApi(enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:$kotlinWrappersVersion")) - jsMainApi("org.jetbrains.kotlin-wrappers:kotlin-react-dom") - jsMainApi("org.jetbrains.kotlin-wrappers:kotlin-popper") + jsMainApi(libs.wrappers.react.dom) + jsMainApi(libs.wrappers.react.dom) } diff --git a/package-lock.json b/package-lock.json index 4a071ea1c..f6ce26455 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,13 +12,12 @@ "packages/mui-kotlin-test", "packages/playground", "packages/playground-test", + "packages_imported/kotlin-react-dom/18.3.1-pre.791", + "packages_imported/kotlin-react-core/18.3.1-pre.791", + "packages_imported/kotlin-csstype/3.1.3-pre.791", + "packages_imported/kotlin-cssom-core/0.0.1-pre.791", "packages_imported/kotlin-test-js-runner/0.0.1", - "packages_imported/kotlin-popper/2.11.8-pre.786", - "packages_imported/kotlin-cssom-core/0.0.1-pre.786", - "packages_imported/kotlin-react-dom/18.3.1-pre.786", - "packages_imported/kotlin-react-core/18.3.1-pre.786", - "packages_imported/kotlin-csstype/3.1.3-pre.786", - "packages_imported/kotlin-emotion/11.13.0-pre.786" + "packages_imported/kotlin-emotion/11.13.0-pre.791" ], "devDependencies": {} }, @@ -3918,27 +3917,23 @@ } }, "node_modules/kotlin-cssom-core": { - "resolved": "packages_imported/kotlin-cssom-core/0.0.1-pre.786", + "resolved": "packages_imported/kotlin-cssom-core/0.0.1-pre.791", "link": true }, "node_modules/kotlin-csstype": { - "resolved": "packages_imported/kotlin-csstype/3.1.3-pre.786", + "resolved": "packages_imported/kotlin-csstype/3.1.3-pre.791", "link": true }, "node_modules/kotlin-emotion": { - "resolved": "packages_imported/kotlin-emotion/11.13.0-pre.786", - "link": true - }, - "node_modules/kotlin-popper": { - "resolved": "packages_imported/kotlin-popper/2.11.8-pre.786", + "resolved": "packages_imported/kotlin-emotion/11.13.0-pre.791", "link": true }, "node_modules/kotlin-react-core": { - "resolved": "packages_imported/kotlin-react-core/18.3.1-pre.786", + "resolved": "packages_imported/kotlin-react-core/18.3.1-pre.791", "link": true }, "node_modules/kotlin-react-dom": { - "resolved": "packages_imported/kotlin-react-dom/18.3.1-pre.786", + "resolved": "packages_imported/kotlin-react-dom/18.3.1-pre.791", "link": true }, "node_modules/kotlin-test-js-runner": { @@ -6422,6 +6417,14 @@ "packages_imported/kotlin-cssom-core/0.0.1-pre.786": { "name": "kotlin-cssom-core", "version": "0.0.1-pre.786", + "extraneous": true, + "dependencies": { + "format-util": "^1.0.5" + }, + "devDependencies": {} + }, + "packages_imported/kotlin-cssom-core/0.0.1-pre.791": { + "version": "0.0.1-pre.791", "dependencies": { "format-util": "^1.0.5" }, @@ -6430,6 +6433,14 @@ "packages_imported/kotlin-csstype/3.1.3-pre.786": { "name": "kotlin-csstype", "version": "3.1.3-pre.786", + "extraneous": true, + "dependencies": { + "format-util": "^1.0.5" + }, + "devDependencies": {} + }, + "packages_imported/kotlin-csstype/3.1.3-pre.791": { + "version": "3.1.3-pre.791", "dependencies": { "format-util": "^1.0.5" }, @@ -6438,6 +6449,19 @@ "packages_imported/kotlin-emotion/11.13.0-pre.786": { "name": "kotlin-emotion", "version": "11.13.0-pre.786", + "extraneous": true, + "dependencies": { + "@emotion/cache": "^11.13.1", + "@emotion/css": "^11.13.0", + "@emotion/react": "^11.13.0", + "@emotion/styled": "^11.13.0", + "format-util": "^1.0.5", + "react": "^18.3.1" + }, + "devDependencies": {} + }, + "packages_imported/kotlin-emotion/11.13.0-pre.791": { + "version": "11.13.0-pre.791", "dependencies": { "@emotion/cache": "^11.13.1", "@emotion/css": "^11.13.0", @@ -6451,6 +6475,7 @@ "packages_imported/kotlin-popper/2.11.8-pre.786": { "name": "kotlin-popper", "version": "2.11.8-pre.786", + "extraneous": true, "dependencies": { "@popperjs/core": "^2.11.8", "format-util": "^1.0.5" @@ -6460,6 +6485,15 @@ "packages_imported/kotlin-react-core/18.3.1-pre.786": { "name": "kotlin-react-core", "version": "18.3.1-pre.786", + "extraneous": true, + "dependencies": { + "format-util": "^1.0.5", + "react": "^18.3.1" + }, + "devDependencies": {} + }, + "packages_imported/kotlin-react-core/18.3.1-pre.791": { + "version": "18.3.1-pre.791", "dependencies": { "format-util": "^1.0.5", "react": "^18.3.1" @@ -6469,6 +6503,16 @@ "packages_imported/kotlin-react-dom/18.3.1-pre.786": { "name": "kotlin-react-dom", "version": "18.3.1-pre.786", + "extraneous": true, + "dependencies": { + "format-util": "^1.0.5", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": {} + }, + "packages_imported/kotlin-react-dom/18.3.1-pre.791": { + "version": "18.3.1-pre.791", "dependencies": { "format-util": "^1.0.5", "react": "^18.3.1", @@ -6494,7 +6538,6 @@ "@mui/system": "5.16.7", "@mui/x-date-pickers": "5.0.20", "@mui/x-tree-view": "7.12.0", - "@popperjs/core": "^2.11.8", "format-util": "^1.0.5", "react": "^18.3.1", "react-dom": "^18.3.1" @@ -6515,7 +6558,6 @@ "@mui/system": "5.16.7", "@mui/x-date-pickers": "5.0.20", "@mui/x-tree-view": "7.12.0", - "@popperjs/core": "^2.11.8", "format-util": "^1.0.5", "react": "^18.3.1", "react-dom": "^18.3.1" diff --git a/playground/build.gradle.kts b/playground/build.gradle.kts index 19e36e1d7..5a217f4ce 100644 --- a/playground/build.gradle.kts +++ b/playground/build.gradle.kts @@ -2,13 +2,10 @@ plugins { id("io.github.turansky.kfc.application") } -val kotlinWrappersVersion = property("kotlin-wrappers.version") as String - dependencies { - jsMainImplementation(enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:$kotlinWrappersVersion")) - jsMainImplementation("org.jetbrains.kotlin-wrappers:kotlin-emotion") - jsMainImplementation("org.jetbrains.kotlin-wrappers:kotlin-react") - jsMainImplementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom") + jsMainImplementation(libs.wrappers.emotion) + jsMainImplementation(libs.wrappers.react) + jsMainImplementation(libs.wrappers.react.dom) jsMainImplementation(project(":mui-kotlin")) diff --git a/settings.gradle.kts b/settings.gradle.kts index 72f1cf3d1..1af19f230 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,6 +19,13 @@ dependencyResolutionManagement { repositories { mavenCentral() } + + versionCatalogs { + create("libs") { + val wrappersVersion = extra["kotlin.wrappers.version"] + from("org.jetbrains.kotlin-wrappers:kotlin-wrappers-catalog:$wrappersVersion") + } + } } include("mui-kotlin")