How to make this kotlin script do checks with errors, but return a value in an idiomatic way?

前端 未结 0 495
既然无缘
既然无缘 2021-02-05 21:18

I wrote this function here to fetch an API key required during our gradle build:

fun getApiKey(): String {
    val keyFile = File("../whatever")
    if          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题