Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iv-cores/gradle-info
gradle plugin to write a properties file
https://github.com/iv-cores/gradle-info
gradle-plugin
Last synced: about 2 months ago
JSON representation
gradle plugin to write a properties file
- Host: GitHub
- URL: https://github.com/iv-cores/gradle-info
- Owner: iv-cores
- License: apache-2.0
- Created: 2024-08-05T00:18:42.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-08T05:48:04.000Z (5 months ago)
- Last Synced: 2024-08-08T06:52:14.804Z (5 months ago)
- Topics: gradle-plugin
- Language: Kotlin
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gradle-properties-writer
A Gradle plugin to write a properties file.
## Overview
The `gradle-properties-writer` plugin allows you to generate a properties file during your Gradle build process.
This can be useful for storing project metadata or other configuration details in a standardized format.## Installation
To apply the plugin, add the following to your `build.gradle.kts`:
```kotlin
plugins {
id("org.ivcode.gradle-info") version "0.1-SNAPSHOT"
}
```## Configuration
The plugin can be configured using the info extension. Here are the available configuration options:| Property | Description |
|------------------|---------------------------------------------------------------------------------------------------------------------------------|
| `outputDir` | The directory where the properties file will be written. Default is `build/properties`. |
| `outputFileName` | The name of the properties file. Default is `build.properties`. |
| `properties` | A map of properties to be written to the file. If not specified, default properties (`group`, `name`, `version`) will be used. |Example configuration:
```kotlin
info {
outputDir = file("build/generated")
outputFileName = "my-properties.properties"
properties = mapOf(
"key1" to "value1",
"key2" to "value2"
)
}
```## Usage
To generate the properties file, run the `writeProperties` task:```shell
./gradlew info
```
This will generate a properties file in the specified output directory with the specified properties.