-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow all local.properties flags to be overridden by environment #361
Conversation
@brunobowden ptal. please do #358 first |
Is there a precedence for this precedence? E.g. that the JVM or other tools have similar behaviour? I've tried searching online but didn't get a good answer for this. The only example I could find seemed to suggest that local properties took precedence over the environment. I'm think that a system that has gone through battle testing on this front would have sound reasons for doing it that way. We should be careful about doing something difference. http://www.javacodegeeks.com/2012/02/properties-with-spring.html 4.1 Properties Search Precedence In Spring 3.0 and before, the old PropertyPlaceholderConfigurer also attempted to look for properties both in the manually defined sources as well as in the System properties. The lookup precedence was also customizable via the systemPropertiesMode property of the configurer: fallback (default) – Check system properties if not resolvable in the specified properties files Finally, note that in case a property is defined in two or more files defined via @propertysource – the last definition will win and override the previous ones. This makes the exact property value hard to predict, so if overriding is important, the PropertySource API can be used instead. |
So does Android I guess: alright, I'll swap the priority order back to properties overrides environment |
Another issue we'll have for the future... is when build.gradle allows you On Wed, Aug 19, 2015 at 11:08 AM Advay Mengle [email protected]
|
fdae4ed
to
0541bee
Compare
ptal @brunobowden - put the order back to the way it was |
|
||
This is helpful for a tight modify-compile-test loop using only debug binaries. | ||
You can also do this for `j2objc.debug.enabled`. | ||
|
||
If you'd rather just disable release builds for a particular run of the command line: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line afterwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
LGTM - it would be nice to add a test for Utils.groovy for loading a property from an environment variable. |
filed a bug for mocking System.getenv - not sure how to at the moment |
Actually, it is baffling as it is a failure in JDK 8.0 only. JDK 7.0 is On Thu, Aug 20, 2015 at 10:20 AM Bruno Bowden [email protected]
|
Fixes j2objc-contrib#360 local.properties values will override those in environment
0541bee
to
06eb941
Compare
well the tests are passing now. looks like we are flaky on JDK8 - i reran various commits on Travis over and over and JDK8 sometimes fails, sometimes passes. i'm sending a PR to provide more info on such failures. right now it just tells you to look at the testreport.html which obviously we can't. |
It would be helpful to have a more detailed record, including the On Thu, Aug 20, 2015 at 11:08 AM madvay public repo API account <
|
We can't see the HTML file, but we can get the exception details: see PR #373 |
Allow all local.properties flags to be overridden by environment
Fixes #360
BREAKING API CHANGE:
J2OBJC_HOME environment value will now override j2objc.home
in local.properties instead of the other way around.