Repository: vavr-io/vavr (language: java)

Issue:
Required ossrhUsername and ossrhPassword for Gradle
Hey,

While trying to import Vavr project in Intellij, Gradle immediately breaks (even if trying to run `gradle build`) because variables `ossrhUsername` and `ossrhPassword` are not set.

I thought it might be a good idea - if possible - to adapt `build.gradle` so that it doesn't crash when users don't try to release.

I could not find any issue mentioning this :sweat_smile: 


Discussion / hints:
Thanks for reporting it! In fact I did the last release using VS Code 🙂

We [recently changed](https://github.com/vavr-io/vavr/pull/2665) the Gradle build. I think we need to provide default values for the case the properties are undefined.

Before that change it was:

```groovy
def sonatypeUser = findProperty("ossrhUsername")
def sonatypePass = findProperty("ossrhPassword")
```

After the change:

```groovy
username.set(providers.systemProperty("ossrhUsername").forUseAtConfigurationTime())
password.set(providers.systemProperty("ossrhPassword").forUseAtConfigurationTime())
```

Does the function `systemProperty` take a default param, like

```
username.set(providers.systemProperty("ossrhUsername", "").forUseAtConfigurationTime())
password.set(providers.systemProperty("ossrhPassword", "").forUseAtConfigurationTime())
```

Is that the location where the Gradle project import fails?
If you want to make progress, just ignore this problem and delete the release config from the `build.gradle`. Before committing, restore the `build.gradle`.
Oh in the meantime I have put dummy values for those 2 in `~/.gradle/gradle.properties` so I'm not blocked, but I thought it was healthier to open an issue anyway :smile: 
@danieldietrich , according to documentation there's  `orElse​(T value)` method, here https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html#orElse-T-

So the code probably should look like this:
```
username.set(providers.systemProperty("ossrhUsername").orElse("").forUseAtConfigurationTime())
password.set(providers.systemProperty("ossrhPassword").orElse("").forUseAtConfigurationTime())
```

I'm ready to file a pull request, however I cannot see these changes https://github.com/vavr-io/vavr/pull/2665/commits/e683ee2c044d0eaf24d03b7e9fdb3f67b88fbf5b on `master`, for some reason?

=================
**Update** I cannot see some of the changes frоm here https://github.com/vavr-io/vavr/pull/2665/commits/e683ee2c044d0eaf24d03b7e9fdb3f67b88fbf5b as they were reverted with later commit, here https://github.com/vavr-io/vavr/commit/8f092e50c349b8d7bd2e8840949324a05cc3d15c
Hi all, yes - I pulled #2691 as part of the last alpha release.

Does it now work for you @sir4ur0n on the current master or do we need to change it to @sleepytomcat's solution?
On the latest `master` (000a4b4cb3d54cb180c905d98d837fabc401f283) I still get:
```
Could not get unknown property 'ossrhUsername' for object of type io.github.gradlenexus.publishplugin.NexusRepository.
```

Fix patch:
diff --git a/build.gradle b/build.gradle
index f12ffbe24..bb8bed898 100644
--- a/build.gradle
+++ b/build.gradle
@@ -182,8 +182,8 @@ signing {
 nexusPublishing {
     repositories {
         sonatype {
-            username.set(ossrhUsername)
-            password.set(ossrhPassword)
+            username.set(providers.systemProperty("ossrhUsername").orElse("").forUseAtConfigurationTime())
+            password.set(providers.systemProperty("ossrhPassword").orElse("").forUseAtConfigurationTime())        
         }
     }
 }


Test patch: