So I’ve been stuck on this for a few days right no...
# multiplatform
r
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
Is it complaining about macos dependency?
r
@bdeg I updated my gist with the non-debug log, you can see that it does not find any of the dependencies imported
b
Is your project open source?
r
It’s not but it’s just a test thing
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
The package names are different in the example and the gradle log
r
The problem was that I was missing this line in `settings.gradle.kts`:
Copy code
enableFeaturePreview("GRADLE_METADATA")