All Projects → novoda → Gradle Build Properties Plugin

novoda / Gradle Build Properties Plugin

Licence: other
Keep your secrets secret. External build properties support for your Gradle scripts.

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Gradle Build Properties Plugin

Gradle Static Analysis Plugin
Easy setup of static analysis tools for Android and Java projects.
Stars: ✭ 398 (+261.82%)
Mutual labels:  gradle, gradle-plugin, novoda, open-source
Gradle Android Command Plugin
Handy commands for testing Android on CI
Stars: ✭ 349 (+217.27%)
Mutual labels:  gradle, gradle-plugin, novoda, open-source
Gradle S3 Build Cache
An AWS S3 Gradle build cache implementation
Stars: ✭ 54 (-50.91%)
Mutual labels:  gradle, gradle-plugin
Gradle Semantic Build Versioning
Gradle plugin to generate version-numbers and tags using semantic versioning
Stars: ✭ 69 (-37.27%)
Mutual labels:  gradle, gradle-plugin
Androidanimationexercise
Android 动画各种实现,包括帧动画、补间动画和属性动画的总结分享
Stars: ✭ 1,254 (+1040%)
Mutual labels:  gradle, gradle-plugin
Hunter
A fast, incremental, concurrent framework to develop compile plugin for android project to manipulate bytecode
Stars: ✭ 999 (+808.18%)
Mutual labels:  gradle, gradle-plugin
Enigma
Gradle Plugin - Obfuscator String Encryption (Android/Java)
Stars: ✭ 43 (-60.91%)
Mutual labels:  gradle, gradle-plugin
Gradle Plugins
Gradle Plugin Collection
Stars: ✭ 84 (-23.64%)
Mutual labels:  gradle, gradle-plugin
Gradle Defaults
Plugin providing opinionated defaults for Gradle projects.
Stars: ✭ 7 (-93.64%)
Mutual labels:  gradle, gradle-plugin
Gradle Quality Plugin
Gradle quality plugin for Java and Groovy
Stars: ✭ 97 (-11.82%)
Mutual labels:  gradle, gradle-plugin
Ios Demos
Examples of ios applications http://www.novoda.com/blog
Stars: ✭ 85 (-22.73%)
Mutual labels:  novoda, open-source
Vertx Gradle Plugin
An opinionated Gradle plugin for Vert.x projects
Stars: ✭ 98 (-10.91%)
Mutual labels:  gradle, gradle-plugin
Novoda
Common things for all Novoda's open source projects
Stars: ✭ 37 (-66.36%)
Mutual labels:  novoda, open-source
Gradle Kotlin Aspectj Weaver
A Gradle plugin that allows you to weave your compiled Java and Kotlin files with AspectJ
Stars: ✭ 14 (-87.27%)
Mutual labels:  gradle, gradle-plugin
Auto Manifest
Generates AndroidManifest.xml in simple libraries so that you don't have to
Stars: ✭ 51 (-53.64%)
Mutual labels:  gradle, gradle-plugin
Aosp.changelog.to
Generates a change log between different aosp tags. Based on the wonderful work of @alsutton
Stars: ✭ 12 (-89.09%)
Mutual labels:  novoda, open-source
Accessibilitools
UI tools to help make your Android app accessible.
Stars: ✭ 81 (-26.36%)
Mutual labels:  novoda, open-source
Gradle Changelog Plugin
Plugin for parsing and managing the Changelog in a "keep a changelog" style.
Stars: ✭ 102 (-7.27%)
Mutual labels:  gradle, gradle-plugin
Ktlint Gradle
A ktlint gradle plugin
Stars: ✭ 713 (+548.18%)
Mutual labels:  gradle, gradle-plugin
Plantuml Gradle Plugin
Gradle plugin to build PlantUML diagrams from code (for living and up-to-date documentation)
Stars: ✭ 27 (-75.45%)
Mutual labels:  gradle, gradle-plugin

gradle-build-properties-plugin

Bintray

External properties support for your gradle builds.

Using the old com.novoda:build-properties-plugin? You should migrate away from it as soon as possible.

Description

Gradle builds are highly configurable through various properties. Rather than hardcoding these properties in your build scripts, for security reasons and in order to increase modularity, it's a common practice to provide these properties from external sources.

This plugin aims to provide a simple way to:

  • consume properties from external and internal sources like project properties, system properties, files etc.
  • define a custom source for properties
  • configure Android build with external properties

Adding to your project

Apply the plugin from jCenter as a classpath dependency:

buildscript {
  repositories {
    jcenter()
  }
  dependencies {
    classpath 'com.novoda:gradle-build-properties-plugin:0.4.1'
  }
}

apply plugin: 'com.novoda.build-properties'

or from the Gradle Plugins Repository:

plugins {
    id 'com.novoda.build-properties' version '0.4.1'
}

Simple usage

Add a buildProperties configuration to your build script listing all the properties files you intend to reference later on:

buildProperties {
    secrets {
        using project.file('secrets.properties')
    }
}

where secrets.properties is a properties file containing key/value pairs:

secret_key=12345
foo=bar

that can now be referenced in the build script as buildProperties.secrets:

boolean enabled = buildProperties.secrets['a'].boolean
int count = buildProperties.secrets['b'].int
double rate = buildProperties.secrets['c'].double
String label = buildProperties.secrets['d'].string

It is important to note that values are lazy loaded too. Trying to access the value of a specific property could generate an exception if the key is missing in the provided properties file, e.g.:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> No value defined for property 'notThere' in 'secrets' properties (/Users/toto/novoda/spikes/BuildPropertiesPlugin/sample/properties/secrets.properties)

Advanced usage

For more advanced configurations, please refer to the advanced usage.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].