[Xamarin.Android.Build.Tasks] property refactoring/cleanup #3623
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.
Context: master...jonathanpeppers:fully-incremental
I am working on a revamp of the
<GenerateJavaStubs/>
MSBuild task tomake it "fully incremental".
The following parts of the build would happen on a per-assembly basis:
javac
classes.zip
or*.jar
filesThis will be hidden behind a feature flag such as
/p:_AndroidFullyIncremental=True
for its first implementation.The problem I am facing is that our build throws random Java sources
into
$(IntermediateOutputPath)android\src
throughout the build. Thisincludes files like
R.java
,MonoRuntimeProvider.java
, etc.To make it where the location of these files is modifiable, we can
create a few new private properties:
$(_AndroidIntermediateJavaSourceDirectory)
which is$(IntermediateOutputPath)android\src\
$(_AndroidIntermediateJavaClassDirectory)
which is$(IntermediateOutputPath)android\bin\classes\
$(_AndroidIntermediateClassesZip)
which is$(IntermediateOutputPath)android\bin\classes.zip
This way I can modify the location when the
_AndroidFullyIncremental
feature flag is set.
To refactor things a bit further, I also removed usage of
$(MonoAndroidIntermediate)
and just used$(IntermediateOutputPath)
instead.
$(IntermediateOutputPath)
should be generally morewell-known for MSBuild, and I kept the original property around
because I found usage in other repos.