Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmslpm/gradle-include-properties
Gradle Plugin : Include several additional Java Properties files
https://github.com/tmslpm/gradle-include-properties
Last synced: about 1 month ago
JSON representation
Gradle Plugin : Include several additional Java Properties files
- Host: GitHub
- URL: https://github.com/tmslpm/gradle-include-properties
- Owner: tmslpm
- License: mit
- Created: 2024-11-13T01:15:22.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-13T04:19:09.000Z (about 1 month ago)
- Last Synced: 2024-11-13T05:21:36.083Z (about 1 month ago)
- Language: Java
- Size: 64.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# Gradle Plugin : Include Properties
- License: MIT
## Setup
- clone the project
- execute the task publishToMavenLocal
- edit your "build.gradle" and add the plugin```groovy
plugins {
id 'gradle-include-properties' version '1.0.0'
}// (optional) after evaluation, check if the keys exists
expectedProperties {
expected = [
"my_key_1",
"my_key_2",
"my_key_3"
]
}
```- edit your "gradle.properties"
````properties
org.gradle.jvmargs=-Xmx4G
# etc...include.properties=extra.properties
include.properties.override=true
````- create the file "extra.properties" to be included
````properties
my_key_1=a
my_key_2=b
my_key_3=c
````````groovy
task printProperties {
doLast {
println "my_key_1 <- ${project.findProperty('my_key_1')}"
println "my_key_2 <- ${project.findProperty('my_key_2')}"
println "my_key_3 <- ${project.findProperty('my_key_3')}"
}
}
````With multiple file
````properties
include.properties=file1.properties,../file2.properties,my-directory
include.properties.override=true
````