0

In my build.gradle file, I have a reference to a property that is in the gradle.properties file:

    credentials {
        username "$USERNAME"
        password "$PASSWORD"
    }

And in the gradle.properties file:

USERNAME=BLAH
PASSWORD=BLAHBLAH

In Intellij, I have an error:

A problem occurred evaluating root project 'my-Project'. Could not get unknown property 'USERNAME' for Credentials [username: null] of type org.gradle.internal.credentials.DefaultPasswordCredentials_Decorated.

I doubled check the name of the property + restarted the computer + invalidated the cache in the Intellj, but nothing seems to help

riorio
  • 6,500
  • 7
  • 47
  • 100

1 Answers1

0

So after looking in the Intellij's

File -> Setttings -> Build Execution -> Build Tools -> Gradle -> "Gradle User Home"

I realized the Intellij is looking at another gradle.properties file:

C:\Users\<user-X>\.gradle <-- I was focusing on this folder
C:\Users\<user-Y>\.gradle <-- while Intellij was looking at that folder
riorio
  • 6,500
  • 7
  • 47
  • 100