From d508bae878e9ffe74184ee5ed54b6722d660bf50 Mon Sep 17 00:00:00 2001 From: John O'Reilly Date: Fri, 15 Sep 2023 22:04:05 +0100 Subject: [PATCH] dependency updates --- README.md | 2 +- app/build.gradle.kts | 31 +++++----- backend/build.gradle.kts | 45 +++++++++------ .../{main => jvmMain}/appengine/.gcloudignore | 0 .../src/{main => jvmMain}/appengine/app.yaml | 0 .../{main => jvmMain}/kotlin/PeopleData.kt | 0 .../src/{main => jvmMain}/kotlin/Server.kt | 0 build.gradle.kts | 29 ++++++++++ buildSrc/src/main/java/Dependencies.kt | 13 +---- common/build.gradle.kts | 4 +- compose-desktop/build.gradle.kts | 2 +- compose-web-wasm/build.gradle.kts | 29 ++++++++-- gradle/libs.versions.toml | 31 +++++----- graphql-server/build.gradle.kts | 56 ++++++++++--------- .../src/{main => jvmMain}/appengine/app.yaml | 0 .../peopleinspace/DefaultApplication.kt | 0 .../peopleinspace/IssPositionSubscription.kt | 0 .../kotlin/com/surrus/peopleinspace/graph.kt | 0 .../kotlin/com/surrus/peopleinspace/main.kt | 0 .../resources/application.yml | 0 settings.gradle.kts | 2 +- wearApp/build.gradle.kts | 8 +-- 22 files changed, 152 insertions(+), 100 deletions(-) rename backend/src/{main => jvmMain}/appengine/.gcloudignore (100%) rename backend/src/{main => jvmMain}/appengine/app.yaml (100%) rename backend/src/{main => jvmMain}/kotlin/PeopleData.kt (100%) rename backend/src/{main => jvmMain}/kotlin/Server.kt (100%) rename graphql-server/src/{main => jvmMain}/appengine/app.yaml (100%) rename graphql-server/src/{main => jvmMain}/kotlin/com/surrus/peopleinspace/DefaultApplication.kt (100%) rename graphql-server/src/{main => jvmMain}/kotlin/com/surrus/peopleinspace/IssPositionSubscription.kt (100%) rename graphql-server/src/{main => jvmMain}/kotlin/com/surrus/peopleinspace/graph.kt (100%) rename graphql-server/src/{main => jvmMain}/kotlin/com/surrus/peopleinspace/main.kt (100%) rename graphql-server/src/{main => jvmMain}/resources/application.yml (100%) diff --git a/README.md b/README.md index 540233a6..5177a813 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Have tested this out in Google App Engine deployment. Using shadowJar plugin to ``` ./gradlew :backend:shadowJar -gcloud app deploy backend/build/libs/backend-all.jar cloud app deploy backend/build/libs/backend-all.jar --appyaml=backend/src/main/appengine/app.yaml +gcloud app deploy backend/build/libs/backend-all.jar --appyaml=backend/src/jvmMain/appengine/app.yaml ``` ### GraphQL backend diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0b769e51..507c958a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -81,15 +81,16 @@ dependencies { implementation(appwidget) } - with(Deps.Compose) { - implementation(ui) - implementation(uiGraphics) - implementation(foundationLayout) - implementation(material) - implementation(navigation) - implementation(coilCompose) - implementation(uiTooling) - } + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.foundation.layout) + implementation(libs.androidx.compose.material) + implementation(libs.androidx.compose.runtime) + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.tooling) + implementation(libs.androidx.navigation.compose) + implementation(libs.androidx.compose.material3) + implementation(Deps.Compose.coilCompose) with(Deps.Koin) { implementation(core) @@ -106,14 +107,16 @@ dependencies { testImplementation(robolectric) testImplementation(mockito) - // Compose testing dependencies - androidTestImplementation(composeUiTest) - androidTestImplementation(composeUiTestJUnit) androidTestImplementation(composeNavTesting) - debugImplementation(composeUiTestManifest) - } + // Compose testing dependencies + androidTestImplementation(platform(libs.androidx.compose.bom)) + androidTestImplementation(libs.androidx.compose.ui.test) + androidTestImplementation(libs.androidx.compose.ui.test.junit) + debugImplementation(libs.androidx.compose.ui.test.manifest) + + implementation(project(":common")) } diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 95252345..2c2e33a1 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -1,31 +1,40 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { - id("kotlin-platform-jvm") + kotlin("multiplatform") application kotlin("plugin.serialization") id("com.github.johnrengelman.shadow") } -dependencies { - with(Deps.Kotlinx) { - implementation(serializationCore) // JVM dependency - implementation(coroutinesCore) - } - with(Deps.Ktor) { - implementation(serverCore) - implementation(serverNetty) - implementation(serverCors) - implementation(serverContentNegotiation) - implementation(json) +kotlin { + jvm() { + withJava() } - with(Deps.Log) { - implementation(logback) - } + sourceSets { + val jvmMain by getting { + dependencies { + with(Deps.Kotlinx) { + implementation(serializationCore) // JVM dependency + implementation(coroutinesCore) + } - implementation(project(":common")) + with(Deps.Ktor) { + implementation(serverCore) + implementation(serverNetty) + implementation(serverCors) + implementation(serverContentNegotiation) + implementation(json) + } + + with(Deps.Log) { + implementation(logback) + } + + implementation(project(":common")) + } + } + } } application { diff --git a/backend/src/main/appengine/.gcloudignore b/backend/src/jvmMain/appengine/.gcloudignore similarity index 100% rename from backend/src/main/appengine/.gcloudignore rename to backend/src/jvmMain/appengine/.gcloudignore diff --git a/backend/src/main/appengine/app.yaml b/backend/src/jvmMain/appengine/app.yaml similarity index 100% rename from backend/src/main/appengine/app.yaml rename to backend/src/jvmMain/appengine/app.yaml diff --git a/backend/src/main/kotlin/PeopleData.kt b/backend/src/jvmMain/kotlin/PeopleData.kt similarity index 100% rename from backend/src/main/kotlin/PeopleData.kt rename to backend/src/jvmMain/kotlin/PeopleData.kt diff --git a/backend/src/main/kotlin/Server.kt b/backend/src/jvmMain/kotlin/Server.kt similarity index 100% rename from backend/src/main/kotlin/Server.kt rename to backend/src/jvmMain/kotlin/Server.kt diff --git a/build.gradle.kts b/build.gradle.kts index 0b67daf7..66cc027b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,6 +9,35 @@ plugins { alias(libs.plugins.shadowPlugin) apply false } +allprojects { + + repositories { + google() + mavenCentral() + maven(url = "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers") + maven(url = "https://jitpack.io") + maven(url = "https://maven.pkg.jetbrains.space/public/p/kotlinx-coroutines/maven") + maven(url = "https://oss.sonatype.org/content/repositories/snapshots/") + maven(url = "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap") + maven(url = "https://androidx.dev/storage/compose-compiler/repository") + maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental") + maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") + maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/") + } + +// configurations.all { +// resolutionStrategy.eachDependency { +// println(requested.module.name) +// if (requested.module.name.equals("kotlin-stdlib-js")) { +// useVersion("1.9.20-Beta") +// } +// +// if (requested.module.name.equals("kotlin-stdlib")) { +// useVersion("1.9.20-dev-7405") +// } +// } +// } +} /* buildscript { diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 0b1c0229..13159472 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -10,10 +10,8 @@ object Versions { const val kmpNativeCoroutinesVersion = "1.0.0-ALPHA-13" - const val compose = "1.4.3" const val wearCompose = "1.2.0-beta01" const val navCompose = "2.5.3" - const val accompanist = "0.30.1" const val horologist = "0.4.8" const val composeMaterial3 = "1.1.1" const val glance = "1.0.0-rc01" @@ -99,18 +97,13 @@ object Deps { const val robolectric = "org.robolectric:robolectric:${Versions.robolectric}" const val testCore = "androidx.test:core:${Versions.testCore}" - const val composeUiTest = "androidx.compose.ui:ui-test:${Versions.compose}" - const val composeUiTestJUnit = "androidx.compose.ui:ui-test-junit4:${Versions.compose}" - const val composeUiTestManifest = "androidx.compose.ui:ui-test-manifest:${Versions.compose}" +// const val composeUiTest = "androidx.compose.ui:ui-test:${Versions.compose}" +// const val composeUiTestJUnit = "androidx.compose.ui:ui-test-junit4:${Versions.compose}" +// const val composeUiTestManifest = "androidx.compose.ui:ui-test-manifest:${Versions.compose}" const val composeNavTesting = "androidx.navigation:navigation-testing:${Versions.navCompose}" } object Compose { - const val ui = "androidx.compose.ui:ui:${Versions.compose}" - const val uiGraphics = "androidx.compose.ui:ui-graphics:${Versions.compose}" - const val uiTooling = "androidx.compose.ui:ui-tooling:${Versions.compose}" - const val foundationLayout = "androidx.compose.foundation:foundation-layout:${Versions.compose}" - const val material = "androidx.compose.material:material:${Versions.compose}" const val navigation = "androidx.navigation:navigation-compose:${Versions.navCompose}" const val wearFoundation = "androidx.wear.compose:compose-foundation:${Versions.wearCompose}" diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 1eb1e1f5..fa03f56c 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -10,9 +10,6 @@ plugins { id("io.github.luca992.multiplatform-swiftpackage") version "2.1.1" } -// CocoaPods requires the podspec to have a version. -version = "1.0" - android { compileSdk = AndroidSdk.compile sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") @@ -29,6 +26,7 @@ android { } kotlin { + listOf( iosX64(), iosArm64(), diff --git a/compose-desktop/build.gradle.kts b/compose-desktop/build.gradle.kts index 5b90618b..0ed0d025 100644 --- a/compose-desktop/build.gradle.kts +++ b/compose-desktop/build.gradle.kts @@ -23,5 +23,5 @@ application { compose { kotlinCompilerPlugin.set(libs.versions.jbComposeCompiler) - kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=1.9.10") + kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=1.9.20-Beta2") } diff --git a/compose-web-wasm/build.gradle.kts b/compose-web-wasm/build.gradle.kts index 55d81b0b..db077490 100644 --- a/compose-web-wasm/build.gradle.kts +++ b/compose-web-wasm/build.gradle.kts @@ -1,9 +1,9 @@ import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig plugins { - kotlin("multiplatform") + kotlin("multiplatform") version "1.9.10" id("kotlinx-serialization") - id("org.jetbrains.compose") version "1.4.0-dev-wasm08" + id("org.jetbrains.compose") version "1.5.1-dev-wasm01" } group = "com.example" @@ -44,9 +44,9 @@ kotlin { implementation(compose.material) implementation(compose.components.resources) - implementation("io.ktor:ktor-client-core:2.3.1-wasm0") - implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.1-wasm0") - implementation("io.ktor:ktor-client-content-negotiation:2.3.1-wasm0") + implementation("io.ktor:ktor-client-core:2.3.3-wasm0") + implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.3-wasm0") + implementation("io.ktor:ktor-client-content-negotiation:2.3.3-wasm0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0-RC-wasm0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.0-RC-wasm0") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1-wasm0") @@ -56,6 +56,25 @@ kotlin { } } + +configurations.all { + + resolutionStrategy { + force("org.jetbrains.kotlin:kotlin-stdlib-wasm:1.9.20-dev-7405") + force("org.jetbrains.kotlin:kotlin-stdlib-wasm-js:1.9.20-Beta") + } + resolutionStrategy.eachDependency { +// if (requested.module.name.startsWith("kotlin-stdlib-js")) { +// useVersion("1.9.20-Beta") +// } +// +// if (requested.module.name.startsWith("kotlin-stdlib")) { +// useVersion("1.9.20-dev-7405") +// } + } +} + + compose.experimental { web.application {} } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f447a81a..db7a1632 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,27 +1,27 @@ [versions] -kotlin = "1.9.10" -ksp = "1.9.10-1.0.13" +kotlin = "1.9.20-Beta2" +ksp = "1.9.20-Beta2-1.0.13" coroutines = "1.7.3" -kotlinxSerialization = "1.5.1" -kotlinxDateTime = "0.4.0" +kotlinxSerialization = "1.6.0" +kotlinxDateTime = "0.4.1" androidGradlePlugin = "8.1.0" koin = "3.4.3" koinCompose = "3.4.6" ktor = "2.3.3" -slf4j = "2.0.7" +slf4j = "2.0.9" sqlDelight = "2.0.0" -kmpNativeCoroutines = "1.0.0-ALPHA-13" +kmpNativeCoroutines = "1.0.0-ALPHA-18" androidxActivity = "1.7.2" -androidxComposeCompiler = "1.5.3-dev-k1.9.10-593b4c95fce" -jbComposeCompiler = "1.5.2-beta01" -androidxComposeBom = "2023.08.00" -androidxNavigationCompose = "2.7.1" -androidxLifecycle = "2.6.1" -imageLoader = "1.6.4" - -composeMultiplatform = "1.5.0" -accompanist = "0.30.1" +androidxComposeCompiler = "1.5.4-dev-k1.9.20-Beta2-ac5f960bdaf" +jbComposeCompiler = "1.5.2.1-Beta2" +androidxComposeBom = "2023.09.01" +androidxNavigationCompose = "2.7.3" +androidxLifecycle = "2.6.2" +imageLoader = "1.6.7" + +composeMultiplatform = "1.5.10-beta02" +accompanist = "0.32.0" coilCompose = "2.4.0" junit = "4.13.2" @@ -60,7 +60,6 @@ androidx-compose-material3 = { group = "androidx.compose.material3", name = "ma androidx-compose-material3-WindowSizeClass = { group = "androidx.compose.material3", name="material3-window-size-class" } androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidxNavigationCompose" } androidx-lifecycle-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidxLifecycle" } - imageLoader = { module = "io.github.qdsfdhvh:image-loader", version.ref = "imageLoader" } coilCompose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coilCompose" } diff --git a/graphql-server/build.gradle.kts b/graphql-server/build.gradle.kts index d6b16c62..0aac822f 100644 --- a/graphql-server/build.gradle.kts +++ b/graphql-server/build.gradle.kts @@ -1,41 +1,43 @@ + plugins { - id("kotlin-platform-jvm") + kotlin("multiplatform") id("org.jetbrains.kotlin.plugin.spring") version("1.8.20") - id("org.jetbrains.kotlin.plugin.serialization") + kotlin("plugin.serialization") id("org.springframework.boot") version("2.7.10") - id("com.google.cloud.tools.appengine") version("2.4.2") + //id("com.google.cloud.tools.appengine") version("2.4.2") id("com.github.johnrengelman.shadow") } -dependencies { - implementation("com.expediagroup:graphql-kotlin-spring-server:5.5.0") - implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0") - - testImplementation("com.squareup.okhttp3:okhttp:4.9.3") - - with(Deps.Log) { - implementation(logback) +kotlin { + jvm() { + withJava() } - implementation(project(":common")) -} + sourceSets { + val jvmMain by getting { + dependencies { + implementation("com.expediagroup:graphql-kotlin-spring-server:5.5.0") + implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0") -kotlin { - sourceSets.all { - languageSettings { - optIn("kotlin.RequiresOptIn") + with(Deps.Log) { + implementation(logback) + } + + implementation(project(":common")) + } } } } -appengine { - stage { - setArtifact(tasks.named("bootJar").flatMap { (it as Jar).archiveFile }) - } - deploy { - projectId = "peopleinspace-graphql" - version = "GCLOUD_CONFIG" - } -} \ No newline at end of file + +//appengine { +// stage { +// setArtifact(tasks.named("bootJar").flatMap { (it as Jar).archiveFile }) +// } +// deploy { +// projectId = "peopleinspace-graphql" +// version = "GCLOUD_CONFIG" +// } +//} \ No newline at end of file diff --git a/graphql-server/src/main/appengine/app.yaml b/graphql-server/src/jvmMain/appengine/app.yaml similarity index 100% rename from graphql-server/src/main/appengine/app.yaml rename to graphql-server/src/jvmMain/appengine/app.yaml diff --git a/graphql-server/src/main/kotlin/com/surrus/peopleinspace/DefaultApplication.kt b/graphql-server/src/jvmMain/kotlin/com/surrus/peopleinspace/DefaultApplication.kt similarity index 100% rename from graphql-server/src/main/kotlin/com/surrus/peopleinspace/DefaultApplication.kt rename to graphql-server/src/jvmMain/kotlin/com/surrus/peopleinspace/DefaultApplication.kt diff --git a/graphql-server/src/main/kotlin/com/surrus/peopleinspace/IssPositionSubscription.kt b/graphql-server/src/jvmMain/kotlin/com/surrus/peopleinspace/IssPositionSubscription.kt similarity index 100% rename from graphql-server/src/main/kotlin/com/surrus/peopleinspace/IssPositionSubscription.kt rename to graphql-server/src/jvmMain/kotlin/com/surrus/peopleinspace/IssPositionSubscription.kt diff --git a/graphql-server/src/main/kotlin/com/surrus/peopleinspace/graph.kt b/graphql-server/src/jvmMain/kotlin/com/surrus/peopleinspace/graph.kt similarity index 100% rename from graphql-server/src/main/kotlin/com/surrus/peopleinspace/graph.kt rename to graphql-server/src/jvmMain/kotlin/com/surrus/peopleinspace/graph.kt diff --git a/graphql-server/src/main/kotlin/com/surrus/peopleinspace/main.kt b/graphql-server/src/jvmMain/kotlin/com/surrus/peopleinspace/main.kt similarity index 100% rename from graphql-server/src/main/kotlin/com/surrus/peopleinspace/main.kt rename to graphql-server/src/jvmMain/kotlin/com/surrus/peopleinspace/main.kt diff --git a/graphql-server/src/main/resources/application.yml b/graphql-server/src/jvmMain/resources/application.yml similarity index 100% rename from graphql-server/src/main/resources/application.yml rename to graphql-server/src/jvmMain/resources/application.yml diff --git a/settings.gradle.kts b/settings.gradle.kts index efb78967..5687e54b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -8,7 +8,7 @@ pluginManagement { maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental") maven("https://androidx.dev/storage/compose-compiler/repository") maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental") - maven(url = "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap") + maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap") } } diff --git a/wearApp/build.gradle.kts b/wearApp/build.gradle.kts index 5b14e9c4..764f09e2 100644 --- a/wearApp/build.gradle.kts +++ b/wearApp/build.gradle.kts @@ -70,7 +70,7 @@ dependencies { implementation(wearMaterial) implementation(wearNavigation) implementation(coilCompose) - implementation(uiTooling) + //implementation(uiTooling) } with(Deps.Koin) { @@ -92,9 +92,9 @@ dependencies { testImplementation(mockito) // Compose testing dependencies - androidTestImplementation(composeUiTest) - androidTestImplementation(composeUiTestJUnit) - debugImplementation(composeUiTestManifest) + androidTestImplementation(libs.androidx.compose.ui.test) + androidTestImplementation(libs.androidx.compose.ui.test.junit) + debugImplementation(libs.androidx.compose.ui.test.manifest) debugImplementation("androidx.tracing:tracing:1.1.0") }