diff --git a/CHANGELOG.md b/CHANGELOG.md index fbeaf2f..0cdbcef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.1.0] - 2020-04-21 + +### Added + +- `(Map) env.allVariables` to get all environment variables includes variables specified in `.env` files. [#5](https://github.com/uzzu/dotenv-gradle/pull/5) + ## [1.0.2] - 2020-02-12 ### Fixed diff --git a/README.md b/README.md index c6ad27b..97e6aa2 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ Don't need to apply this plugin to subprojects. ### Create `.env` in the root directory of your gradle project - For example: ```dosini @@ -42,7 +41,15 @@ println(env.BAZ.orElse("default baz")) // => baz If a `.env.template` file exists, this plugin refer it to create a environemnt variable properties in the `env` extension. -[See more examples](/examples/basic) +### Others +- All APIs of `env` extension consider `.env` file. + - If the same variable name value is defined in both the `.env` file and the system environment variable, the system environment variable takes precedence. +- `(Boolean) env.isPresent(name: String)` : Indicates an environment variable with specified name is present. +- `(String) env.fetch(name: String)` : Returns an environment variable. +- `(String) env.fetch(name: String, defaultValue: String)` : Returns an environment variable, or specified default value if environment variable was not set. +- `(String?) env.fetchOrNull(name: String)` : Returns an environment variable, or null if environment variable was not set. +- `(Map