-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
690 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
[*] | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{kt, kts}] | ||
indent_size = 4 | ||
disabled_rules = import-ordering | ||
kotlin_imports_layout = idea | ||
|
||
[*.{yaml, yml}] | ||
indent_size = 2 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (c) 2020. Christian Grach <christian.grach@cmgapps.com> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import org.gradle.api.Project | ||
import java.io.File | ||
import java.util.Locale | ||
import java.util.Properties | ||
import kotlin.properties.ReadOnlyProperty | ||
import kotlin.reflect.KProperty | ||
|
||
class CredentialsDelegate(propertiesFile: File) : ReadOnlyProperty<Any?, String?> { | ||
|
||
private val properties: Properties? = if (propertiesFile.exists()) { | ||
Properties().apply { | ||
load(propertiesFile.inputStream()) | ||
} | ||
} else { | ||
null | ||
} | ||
|
||
override operator fun getValue(thisRef: Any?, property: KProperty<*>): String? { | ||
|
||
if (properties != null) { | ||
return properties.getProperty(property.name) | ||
} | ||
|
||
return System.getenv("BINTRAY_${property.name.toUpperCase(Locale.ROOT)}") | ||
} | ||
} | ||
|
||
fun Project.credentials() = CredentialsDelegate(rootProject.file("credentials.properties")) |
Oops, something went wrong.