[build] fix BuildJniEnvironment_g_cs so it builds incrementally #675
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When building
xamarin-android, I noticed this always runs when thereare no changes:
Reviewing the code in
jnienv-gen.exe, it might not actually updateeither of the
Outputsif there are no changes.So we can either:
<Touch/>call in theBuildJniEnvironment_g_csMSBuildtarget.
jnienv-gen.exealways update the files.I think we should just go with option 2, as it was basically doing:
The
string.Equalscall doesn't seem terrible efficient anyway--let'sjust remove it and always write.
Now we get this on builds without changes:
Fixing this seems to save the ~350ms per
$(TargetFramework)inJava.Interop.csproj.