mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 07:57:12 -07:00
Fix the bogus default value for getProperty().
This commit is contained in:
parent
75fbfb9613
commit
a47b570d16
3 changed files with 5 additions and 5 deletions
|
@ -120,8 +120,8 @@ class GithubApi2 @Inject constructor(
|
|||
Duration.between(VersionCheckTimestampFile.timestamp, Instant.now())) {
|
||||
kobaltLog(2, "Skipping GitHub latest release check, too soon.")
|
||||
} else {
|
||||
val username = localProperties.getNoThrows(PROPERTY_USERNAME, DOC_URL)
|
||||
val accessToken = localProperties.getNoThrows(PROPERTY_ACCESS_TOKEN, DOC_URL)
|
||||
val username = localProperties.getNoThrows(PROPERTY_USERNAME)
|
||||
val accessToken = localProperties.getNoThrows(PROPERTY_ACCESS_TOKEN)
|
||||
try {
|
||||
val req =
|
||||
if (username != null && accessToken != null) {
|
||||
|
|
|
@ -25,10 +25,10 @@ class LocalProperties {
|
|||
result
|
||||
}
|
||||
|
||||
fun getNoThrows(name: String, docUrl: String? = null): String? = localProperties.getProperty(name, docUrl)
|
||||
fun getNoThrows(name: String): String? = localProperties.getProperty(name)
|
||||
|
||||
fun get(name: String, docUrl: String? = null) : String {
|
||||
val result = getNoThrows(name, docUrl)
|
||||
val result = getNoThrows(name)
|
||||
?: throw KobaltException("Couldn't find $name in local.properties", docUrl = docUrl)
|
||||
return result
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ class PublishPlugin @Inject constructor(val files: KFiles, val factory: PomGener
|
|||
val docUrl = DocUrl.PUBLISH_PLUGIN_URL
|
||||
val user = localProperties.get(PROPERTY_BINTRAY_USER, docUrl)
|
||||
val password = localProperties.get(PROPERTY_BINTRAY_PASSWORD, docUrl)
|
||||
val org = localProperties.getNoThrows(PROPERTY_BINTRAY_ORG, docUrl)
|
||||
val org = localProperties.getNoThrows(PROPERTY_BINTRAY_ORG)
|
||||
|
||||
val jcenter = bintrayFactory.create(user, password, org)
|
||||
var success = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue