Fix publishing

This commit is contained in:
Him188 2020-08-19 23:09:40 +08:00
parent 98ade74ae6
commit 60c1242a80
2 changed files with 31 additions and 5 deletions

View File

@ -18,15 +18,16 @@ kotlin {
dependencies {
fun kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$version"
fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version"
fun ktor(id: String, version: String = "1.3.2") = "io.ktor:ktor-$id:$version"
api("org.jsoup:jsoup:1.12.1")
api("com.google.code.gson:gson:2.8.6")
api(kotlinx("coroutines-core", "1.3.9"))
api(ktor("client-core", "1.4.0"))
api(ktor("client-cio", "1.4.0"))
api(ktor("client-json", "1.4.0"))
api(kotlinx("coroutines-core", "1.3.8"))
api(ktor("client-core"))
api(ktor("client-cio"))
api(ktor("client-json"))
compileOnly(gradleApi())
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0")

View File

@ -55,6 +55,18 @@ object Bintray {
}
}
project.file("bintray.user.txt").let { local ->
if (local.exists()) {
return local.readText().trim()
}
}
project.rootProject.file("bintray.user.txt").let { local ->
if (local.exists()) {
return local.readText().trim()
}
}
error(
"Cannot find bintray user, " +
"please specify by creating a file bintray.user.txt in project dir, " +
@ -92,6 +104,19 @@ object Bintray {
}
}
project.file("bintray.user.txt").let { local ->
if (local.exists()) {
return local.readText().trim()
}
}
project.rootProject.file("bintray.user.txt").let { local ->
if (local.exists()) {
return local.readText().trim()
}
}
error(
"Cannot find bintray key, " +
"please specify by creating a file bintray.key.txt in project dir, " +