-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] remove Xamarin.Android.Windows.targets (#…
…2561) * [Xamarin.Android.Build.Tasks] remove Xamarin.Android.Windows.targets Fixes: http://work.devdiv.io/707557 In 539954c, I was aiming to remove the `_RegisterAndroidFilesWithFileWrites` MSBuild target (runs only on Windows). I was having trouble getting everything to work, so I undid this change to make the PR smaller. Reasons to remove `_RegisterAndroidFilesWithFileWrites`: - It looks like it *may* be a source of incremental build bugs. It causes `$(CleanFile)` to grow on incremental builds indefinitely... - We should instead use the `FileWrites` item group appropriately. - We can avoid ~81ms of build time. 81 ms _RegisterAndroidFilesWithFileWrites 1 calls Revisiting it now, it looks like we can remove `Xamarin.Android.Windows.targets` completely! - `_RegisterAndroidFilesWithFileWrites` is the only target. - The `$(_IsRunningXBuild)` property is only used in this file. - I moved the `$(Debugger)` property to `Xamarin.Android.Common.props`. I believe this value is only used in VS Windows, but it make more sense to be here. ~~ CopyGeneratedJavaResourceClasses ~~ The `<CopyGeneratedJavaResourceClasses/>` MSBuild task was copying an `R.java` file from `%TEMP%` to: $(IntermediateOutputPath)android\unnamedproject\unnamedproject\R.java We only use this file in one place, since the rest of the build uses: $(IntermediateOutputPath)android\src\unnamedproject\unnamedproject\R.java We can avoid copying this extra file and adding it to `FileWrites`: - `<CopyGeneratedJavaResourceClasses/>` now optionally uses the `DestinationTopDirectory` property - If `DestinationTopDirectory` is blank, the original source file is returned as the `PrimaryJavaResgenFile` output property. We now use the `R.java` from `%TEMP%` directly, and avoid copying a file to `$(IntermediateOutputPath)`. ~~ Other Changes ~~ I modified the `CheckNothingIsDeletedByIncrementalClean` test to verify that `$(CleanFile)` isn't growing on incremental builds. Anything added to `FileWrites` during the `_CompileDex` MSBuild target (or its dependent targets) wasn't showing up in `$(CleanFile)`! I adjusted its `BeforeTargets` to match what I did in 539954c for `_PrepareAssemblies`. Two files needed to be added to `FileWrites`: - `$(_PackagedResources)` - `$(_GeneratedPrimaryJavaResgenFile)` * [tests] AndroidUpdateResourcesTest.DesignTimeBuild changes `obj/Debug/android/**/R.java` no longer exists after a design-time build. We can still look for `obj/Debug/android/src/**/R.java` after a full build.
- Loading branch information
1 parent
f8f8372
commit a30dd21
Showing
7 changed files
with
65 additions
and
68 deletions.
There are no files selected for viewing
26 changes: 0 additions & 26 deletions
26
...SBuild/Xamarin/Android/Xamarin.Android.Common/ImportAfter/Xamarin.Android.Windows.targets
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters