Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit a595b52

Browse files
authored
Merge pull request #7 from AckeeCZ/fix/gh-action-crash
Fix failing CI trying to find local props
2 parents 44bd0ea + de6a71c commit a595b52

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

gradle/bintray/bintray.gradle

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,22 @@ artifacts {
3232

3333
// Bintray
3434
Properties properties = new Properties()
35-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
35+
def bintrayUser
36+
def bintrayApiKey
37+
38+
// Use local.properties if uploading manually or github secrets if uploading via CI
39+
if (project.rootProject.file('local.properties').exists()) {
40+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
41+
bintrayUser = properties.getProperty("bintray.user")
42+
bintrayApiKey = properties.getProperty("bintray.apikey")
43+
} else {
44+
bintrayUser = System.getenv("bintrayUsername")
45+
bintrayApiKey = System.getenv("bintrayApiKey")
46+
}
3647

3748
bintray {
38-
user = System.getenv("bintrayUsername")
39-
key = System.getenv("bintrayApiKey")
49+
user = bintrayUser
50+
key = bintrayApiKey
4051

4152
configurations = ['archives']
4253
pkg {

0 commit comments

Comments
 (0)