Skip to content
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

[Xamarin.Android.Build.Tasks] property refactoring/cleanup #3623

Merged
merged 1 commit into from
Sep 16, 2019

Commits on Sep 13, 2019

  1. [Xamarin.Android.Build.Tasks] property refactoring/cleanup

    Context: dotnet/android@master...jonathanpeppers:fully-incremental
    
    I am working on a revamp of the `<GenerateJavaStubs/>` MSBuild task to
    make it "fully incremental".
    
    The following parts of the build would happen on a per-assembly basis:
    
    * Java sources generated
    * Java class files compiled via `javac`
    * `classes.zip` or `*.jar` files
    
    This 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. This
    includes 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 more
    well-known for MSBuild, and I kept the original property around
    because I found usage in other repos.
    jonathanpeppers committed Sep 13, 2019
    Configuration menu
    Copy the full SHA
    8659fef View commit details
    Browse the repository at this point in the history