Giter Club home page Giter Club logo

Comments (3)

fartem avatar fartem commented on July 19, 2024

Gradle send errors about this variables not declared. You need to add next lines in local.properties file in the project's root folder:

RELEASE_KEYSTORE_PATH=''
RELEASE_KEYSTORE_PASSWORD=''
RELEASE_KEY_ALIAS=''
RELEASE_KEY_PASSWORD=''

Yes, variables can be empty because you cannot sign the app while run debug version.

from hash-checker-lite.

vipozdn avatar vipozdn commented on July 19, 2024

Gradle send errors about this variables not declared. You need to add next lines in local.properties file in the project's root folder:

RELEASE_KEYSTORE_PATH=''
RELEASE_KEYSTORE_PASSWORD=''
RELEASE_KEY_ALIAS=''
RELEASE_KEY_PASSWORD=''

Yes, variables can be empty because you cannot sign the app while run debug version.

Yes, before opening issue i tried to declare this values in local.properties. The error disappeared.
But look at repo's code:

if (keystoreProperties[KEYSTORE_PATH] == null) {
                keystoreProperties.put(
                        KEYSTORE_PATH,
                        System.getenv(KEYSTORE_PATH)
                )
   ...
}

In my understanding if keystoreProperties[KEYSTORE_PATH] == null (and it is actually null, coz KEYSTORE_PATH not declared in local.properties by default), then keystoreProperties.put() calls, which saves value System.getenv(KEYSTORE_PATH) with a key KEYSTORE_PATH at local.properties.
In theory, your code is built in such a way that you do not need to declare keys in local.properties.

I tried to figure out why this error occurred and found answer that you need to add String.valueOf() for result of System.getenv(KEYSTORE_PATH)

Now gradle error disappears and you don't even need to declare keys in local.properties. Your code already does it for you.

from hash-checker-lite.

fartem avatar fartem commented on July 19, 2024

@vipozdn Thanks. Yes, this is works. I'm added value reading from ENV for CI. local.properties contains values only for current project, and if in ENV you are declared variable with same name but for another project, release build fails. CI (in the app case - GitHub Actions) has a separated environment.

from hash-checker-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.