Joe Mizuno
Joe Mizuno

Reputation: 447

How to set debug.keystore for each android project?

I'm developing some applications that need system UID. So I made a special keystore file "PFDebug.keystore" made from AOSP's platform.pk8 and platform.x509.pem.

I set it in Eclipse >window >preferences >android >build >cutstom debug keystore. That works fine.

But I am also developing non-privileged applications that use my own debug.keystore file. So I have to change keystore file for each build. I know that default debug.keystore is used when I set blank.

How can I bind debug keystore files for each android project?

Upvotes: 5

Views: 2585

Answers (1)

Andros
Andros

Reputation: 4069

It's doable with gradle. For each project you have a build.gradle in which you can specify a signingConfig. Like that :

 signingConfigs {
        debug {
            storeFile file("../debug.keystore")
        }

        release {
            storeFile file("../prod.keystore")
            storePassword 'prod'
            keyAlias 'prod'
            keyPassword 'prod'
        }
    }

Upvotes: 4

Related Questions