The following sample code comes from OpenAI API client for Kotlin project.
You can see it at https://github.com/aallam/openai-kotlin/tree/main/sample/native
I open the sample code with Android Studio, but I can't find where the author define the implementation(projects.openaiClient), I have searched the whole project, could you tell me ?
build.gradle.kts
plugins {
kotlin("multiplatform")
}
kotlin {
val hostOs = System.getProperty("os.name")
val isMingwX64 = hostOs.startsWith("Windows")
val nativeTarget = when {
hostOs == "Mac OS X" -> macosX64("native")
hostOs == "Linux" -> linuxX64("native")
isMingwX64 -> mingwX64("native")
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
}
nativeTarget.apply {
binaries {
executable {
entryPoint = "main"
}
}
}
sourceSets {
val nativeMain by getting {
dependencies {
//implementation("com.aallam.openai:openai-client:<version>")
implementation(projects.openaiClient) // Where is projects.openaiClient
implementation(libs.ktor.client.curl) // Where is libs.ktor.client.curl
}
}
}
}
from Where can I find the definition of projects.openaiClient?
No comments:
Post a Comment