Comments (6)
This feature should be supported in the next release v1.5.0. Specifically, extProperty
config key will be able to be configured to expose the properties map under project.ext
from gradle-git-properties.
Closing because the feature is now available in v1.5.0
Please open new ticket for other requests. Thanks.
from gradle-git-properties.
Thanks for the suggestion. I'm thinking about exposing a Map as task output so the properties can be accessed as generateGitProperties.properties['git.commit.id.abbrev']
BTW because of the UP-TO-DATE check mechanism of Gradle, sometimes, the task will not be executed and so the Map would not be exposed, you will have to force task execution with
generateGitProperties.outputs.upToDateWhen { false }
And of course you will still need
dependsOn tasks.generateGitProperties
to make sure generateGitProperties
to be executed before your logic
I'm also thinking about adding generateGitPropertiesFile
config for the users who need the properties (but not the generated git.properties file). But it would complicate the way up-to-date check works for the plugin.
What do you think?
from gradle-git-properties.
I don't see any benefits in having just exposed properties without the file. Gained performance boost will be negligible but it will introduce more complicated code.
from gradle-git-properties.
Please also add a task to display all generated properties.
from gradle-git-properties.
@sdavids If it is for debugging purpose, I would suggest to use plugin version 1.5 with "--debug" option to display the generated map (see https://github.com/n0mer/gradle-git-properties/blob/master/src/main/groovy/com/gorylenko/GenerateGitPropertiesTask.groovy). If it is not for the debugging, why do you think the extProperty config will not sufficient for the job?
from gradle-git-properties.
Related Issues (20)
- JGit cannot find org.slf4j.impl.StaticLoggerBinder due to relocation HOT 6
- Do not fail build if in a linked working tree and failOnNoGitDirectory = false
- customproperty not showing in /info HOT 1
- Allow multiple tasks with different configurations
- invalid value: core.eol=input HOT 2
- Gradle 8 compatiblity: Missing task dependency on processResources when setting `gitPropertiesResourceDir`
- Plugin should not default to using overlapping task outputs
- Issue with Spring Boot when we create Image HOT 2
- com.gorylenko.GenerateGitPropertiesTask' property 'gitProperties' is missing an input or output annotation? HOT 1
- how can i put the properties file into the jar using johnrengelman shadowJar
- Some properties make builds non incremental when it's expected to be HOT 1
- Deprecation warning for unreadable inputs
- Plugin not accessible using https://plugins.gradle.org/m2/ repo HOT 1
- No artifact of plugin at plugins.gradle.org above version 2.2.4 HOT 1
- Can this be published to maven central
- HEAD instead of branch name in TeamCity
- Upgrade to grgit 5 https://github.com/ajoberstar/grgit/releases/tag/5.0.0
- jgit save config lock file exception on CI
- Configuration cache problems in Gradle 8.1 HOT 8
- Document which files are used in order to get the functionality to work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-git-properties.