So I’ve been stuck on this for a few days right now. I’m using Gradle 5.1.1 and Gradle Kotlin DSL, trying to build an iOS framework from just my common source set, not much. It doesn’t find any dependencies. Gist with code & debug build logs: https://gist.github.com/Ribesg/d76208f8d921cb22b50347e87014c144
I’m about to give up
b
bdeg
01/30/2019, 2:39 PM
Is it complaining about macos dependency?
r
ribesg
01/30/2019, 2:56 PM
@bdeg I updated my gist with the non-debug log, you can see that it does not find any of the dependencies imported
b
bdeg
01/30/2019, 3:00 PM
Is your project open source?
r
ribesg
01/30/2019, 3:02 PM
It’s not but it’s just a test thing
ribesg
01/30/2019, 3:03 PM
There are just 2 files in common, one is an object with a function returning a hello world string, the other is this one:
Copy code
package com.example.mmpp
import io.ktor.client.HttpClient
import io.ktor.client.features.json.JsonFeature
import io.ktor.client.request.get
import kotlinx.serialization.Serializable
object TimeRepository {
private val client = HttpClient {
install(JsonFeature)
}
suspend fun getTime(): GetTimeResponse {
return client.get("<http://worldtimeapi.org/api/ip>")
}
@Serializable
data class GetTimeResponse(
val week_number: String,
val utc_offset: String,
val unixtime: Long,
val timezone: String,
val dst_until: String?,
val dst_from: String?,
val dst: Boolean,
val day_of_year: Short,
val day_of_week: Short,
val datetime: String,
val abbreviation: String
)
}
b
bdeg
01/30/2019, 3:11 PM
The package names are different in the example and the gradle log
r
ribesg
01/30/2019, 3:16 PM
The problem was that I was missing this line in `settings.gradle.kts`: