Coder Social home page Coder Social logo

aws_secret_signing_plugin's Introduction

Gradle plugin to sign android release builds with data from AWS

Store your signing passwords on AWS Secret Manager safely, then apply the plugin to fetch them and configure signing settings for release builds in your local builds

Requirements

You will need to have AWS CLI installed and configured though on your computer

Configuration

In your project build.gradle apply the Secret Signing plugin

Plugin DSL
plugins {
    id "com.inqbarna.secretsigning" version "1.2"
}
Legacy Syntax
buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.inqbarna:secretsigning:1.2"
  }
}

apply plugin: "com.inqbarna.secretsigning"

You can configure it in the secretSigning block as follows either at 'android' block, or at any of the productFlavors

android {
    secretSigning {
        // This is the secret name as declared in AWS Secret Manager
        secretName "your/aws/secret/default"
        // The zone where to fetch the secret (it must be deployed there too)
        regionName "eu-west-1"

        // Local path for the keystore. If you use strong passwords for keystore and for alias
        // it may be safe to commit the file to your repository
        keystoreFile file("keystore_filename.jks")
    }
    
    flavorDimensions "env"
    productFlavors {
        pre {
            dimension "env"
            // You can override any or all the values per flavor basis
            secretSigning {
                // This is the secret name as declared in AWS Secret Manager
                // This overrides the value given at project 'android' configuration
                // level
                secretName "your/aws/secret/pre"
            }
        }
        pro {
            dimension "env"
            secretSigning {
                // This is the secret name as declared in AWS Secret Manager
                secretName "your/aws/secret/pro"
            }
        }
    }
}

AWS Secret format

The plugin expects a key/value list describing information to enable release signing.

The expected structure of the secret is:

{
  "alias_name": "<alias_name_to_use>",
  "alias_pass": "<your_alias_pass>",
  "store_pass": "<your_keystore_pass>"
}

aws_secret_signing_plugin's People

Contributors

davidgarciaanton avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

aws_secret_signing_plugin's Issues

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.