Skip to content

Commit

Permalink
dependency updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joreilly committed Oct 14, 2023
1 parent a9d1511 commit 7f1c428
Show file tree
Hide file tree
Showing 30 changed files with 411 additions and 1,385 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 17 additions & 14 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"))
}

45 changes: 27 additions & 18 deletions backend/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
66 changes: 12 additions & 54 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,7 @@ plugins {
alias(libs.plugins.shadowPlugin) apply false
}


/*
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven(uri("https://plugins.gradle.org/m2/")) // For kotlinter-gradle
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
// keeping this here to allow AS to automatically update
classpath("com.android.tools.build:gradle:8.1.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}")
classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlin}")
with(Deps.Gradle) {
classpath(sqlDelight)
classpath(shadow)
classpath(kotlinter)
classpath(gradleVersionsPlugin)
classpath("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:${Versions.kspPlugin}")
classpath("com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:${Versions.kmpNativeCoroutinesVersion}")
}
}
}
allprojects {
apply(plugin = "org.jmailen.kotlinter")

repositories {
google()
Expand All @@ -53,34 +22,23 @@ allprojects {
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 {
if (requested.module.name.startsWith("kotlin-stdlib")) {
useVersion("1.9.0-Beta")
resolutionStrategy {
dependencySubstitution {
substitute(module("org.jetbrains.kotlin:kotlin-stdlib-wasm:1.9.0"))
.using(module("org.jetbrains.kotlin:kotlin-stdlib-wasm-js:1.9.20-RC"))
}

eachDependency {
if (requested.module.name.startsWith("kotlin-stdlib")) {
useVersion("1.9.20-RC")
}
}
}
}
}

// On Apple Silicon we need Node.js 16.0.0
// https://youtrack.jetbrains.com/issue/KT-49109
rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin::class) {
rootProject.the(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension::class).nodeVersion = "16.0.0"
}
//allprojects {
// configurations.all {
// resolutionStrategy.dependencySubstitution {
// substitute(module("org.jetbrains.compose.compiler:compiler")).apply {
// using(module("androidx.compose.compiler:compiler:${Versions.composeCompiler}"))
// }
// }
// }
//}
*/
13 changes: 3 additions & 10 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}"
Expand Down
55 changes: 28 additions & 27 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ plugins {
id("app.cash.sqldelight")
id("com.google.devtools.ksp")
id("com.rickclephas.kmp.nativecoroutines")
id("io.github.luca992.multiplatform-swiftpackage") version "2.1.1"
//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")
Expand All @@ -29,6 +26,7 @@ android {
}

kotlin {

listOf(
iosX64(),
iosArm64(),
Expand All @@ -45,14 +43,15 @@ kotlin {
}


targetHierarchy.default()
applyDefaultHierarchyTemplate()
//targetHierarchy.default()

//macosX64("macOS")
macosArm64("macOS") {
binaries.framework {
baseName = "common"
}
}
// macosArm64("macOS") {
// binaries.framework {
// baseName = "common"
// }
// }
androidTarget()
jvm()

Expand All @@ -61,7 +60,7 @@ kotlin {
browser()
}

// wasm {
// wasmJs {
// browser()
// }

Expand Down Expand Up @@ -96,21 +95,22 @@ kotlin {
}
}

val androidMain by getting {
androidMain {
dependencies {
implementation(Deps.Ktor.clientAndroid)
implementation(Deps.SqlDelight.androidDriver)
}
}

val jvmMain by getting {
jvmMain {
dependencies {
implementation(Deps.Ktor.clientJava)
implementation(Deps.SqlDelight.sqliteDriver)
implementation(Deps.Log.slf4j)
}
}


val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
Expand Down Expand Up @@ -147,13 +147,14 @@ kotlin {
}
}

val macOSMain by getting {
dependencies {
implementation(Deps.Ktor.clientDarwin)
implementation(Deps.SqlDelight.nativeDriverMacos)
}
}
val jsMain by getting {
// macosMain {
// dependencies {
// implementation(Deps.Ktor.clientDarwin)
// implementation(Deps.SqlDelight.nativeDriverMacos)
// }
// }

jsMain {
dependencies {
implementation(Deps.Ktor.clientJs)
}
Expand All @@ -170,13 +171,13 @@ sqldelight {
}
}

multiplatformSwiftPackage {
packageName("PeopleInSpaceKit")
swiftToolsVersion("5.3")
targetPlatforms {
iOS { v("14") }
}
}
//multiplatformSwiftPackage {
// packageName("PeopleInSpaceKit")
// swiftToolsVersion("5.3")
// targetPlatforms {
// iOS { v("14") }
// }
//}

kotlin.sourceSets.all {
languageSettings.optIn("kotlin.experimental.ExperimentalObjCName")
Expand Down
2 changes: 1 addition & 1 deletion compose-desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ application {

compose {
kotlinCompilerPlugin.set(libs.versions.jbComposeCompiler)
kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=1.9.10")
kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=1.9.20-RC")
}
Loading

0 comments on commit 7f1c428

Please sign in to comment.