Lim Chee Keong
11/02/2022, 9:26 AMimport org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("kotlin-platform-jvm")
application
kotlin("plugin.serialization")
id("com.github.johnrengelman.shadow") version "7.1.2"
id("com.github.ben-manes.versions") version "0.43.0"
}
dependencies {
implementation(project(":shared"))
with(Deps.Kotlinx) {
implementation(serializationCore) // JVM depende
}
with(Deps.Coroutines){
implementation(core)
}
with(Deps.Ktor) {
implementation(serverCore)
implementation(serverNetty)
implementation(serverCors)
implementation(contentNegotiation)
implementation(json)
}
with(Deps.Log) {
implementation(logback)
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
application {
mainClass.set("ServerKt")
}
there is a implementation to have a dependency to the shared project. However, this is the error I got:
backendmain: Could not resolve project :shared.
Required by:
project :backend
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.htmlayodele
11/02/2022, 3:39 PMsettings.gradle.kts
Lim Chee Keong
11/03/2022, 12:44 AMpluginManagement {
repositories {
google()
gradlePluginPortal()
mavenCentral()
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
rootProject.name = "KMM_MFA_PoC"
include(":androidApp")
include(":shared")
include(":backend")
Christopher Mederos
07/11/2023, 6:27 AM