[GRADLE-2710] Properties are not reapplied from local file on Windows Seven. This behavior is not observed on Ubuntu. Created: 18/Mar/13 Updated: 03/Feb/17 Resolved: 03/Feb/17 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.4 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Vadym Yepishov | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 0 |
Description |
When properties are applied from some local file (for example, 'local.gradle'), they are not updated with the next gradle build if they are changed in the mentioned above file. |
Comments |
Comment by Adam Murdoch [ 27/Mar/13 ] |
Can you give more details about what you mean by 'the property was applied in some source files'? |
Comment by Vadym Yepishov [ 28/Mar/13 ] |
This is extract from our root build.gradle file: build.gradle // Apply the baseline configuration properties applyProperties("base.gradle") // Determine the build environment (command-line: "-Penv=<environment>", default: local) if (!hasProperty("env")) { println("Local build environment") } else { println("Build Environment: " + env) applyProperties("${env}.gradle") } // Apply local overrides applyProperties("local.gradle") void applyProperties(String filename) { File configFile = new File(filename) if (configFile.exists()) { println "Applying definitions from ${configFile.absolutePath}" apply from: configFile } } Now, when I run gradle (using the gradle clean build command) for the first time (no .gradle folder in the directory I am running the tool), then the properties in the source files in the ${property} format are properly substituted with the values from the local.gradle file. The local.gradle file has the following format: local.gradle ext { some.property.first = 'some_property_first' some.property.second = 'some_property_second' // ... some.property.nth = 'some.property.nth' } |
Comment by Adam Murdoch [ 02/Apr/13 ] |
Thanks for the information. As a workaround, you can do something like `processResources.outputs.upToDateWhen { false }` |
Comment by Benjamin Muschko [ 15/Nov/16 ] |
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub. We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to. Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle! |
Comment by Vadym Yepishov [ 17/Nov/16 ] |
I still advocate my JIRA issue. |
Comment by Benjamin Muschko [ 03/Feb/17 ] |
I read the use case a couple of times but still have trouble with fully understanding it. I am not going to migrate the issue to GitHub for the following reasons:
Please open an issue on GitHub if it is crucial to your workflow. Please also provide a reproducible example project as a GitHub repository. |