-
Notifications
You must be signed in to change notification settings - Fork 538
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
[Mono.Android] Commit api-34.xml
instead of generating it on every build.
#8679
Conversation
703179a
to
b8fc1c4
Compare
@jpobst I don't think there's a point in compressing the xml and committing a zip. Git already compresses its payload and so committing a ZIP may actually affect git's own performance. Not to mention that every change to the archive in the future will be awkward , since we will have a diff of a ZIP archive, not of the XML file. Git compression may even give better results than ZIP in shrinking the actual storage of the file in the On my installation, git uses level 9 for its compression algorithm: $ git config --get core.compression
9 |
@@ -98,7 +98,6 @@ | |||
|
|||
<!-- Merges various 'api-X.xml.in' files into single 'api.xml' file --> | |||
<Target Name="_GenerateApiDescription" |
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.
As a naming convention I think we could remove the _
prefix now that this target is "public", and should be called directly from command line rather than running automatically as part of the build.
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.
Minor comment but otherwise LGTM. I'm also not sure about updating $(AndroidJavaRuntimeApiLevel)
though and will defer to @grendello or @jonpryor for that.
Configuration.props
Outdated
@@ -22,7 +22,7 @@ | |||
<_StandardLibraryPath Condition=" '$(TargetFrameworkVersion)' == '' ">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries('.NETFramework', 'v4.7.2', ''))</_StandardLibraryPath> | |||
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' And '$(UsingMicrosoftNETSdk)' != 'true' And '$(_StandardLibraryPath)' != '' ">v4.7.2</TargetFrameworkVersion> | |||
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' And '$(UsingMicrosoftNETSdk)' != 'true' ">v4.7.1</TargetFrameworkVersion> | |||
<AndroidJavaRuntimeApiLevel Condition="'$(AndroidJavaRuntimeApiLevel)' == ''">26</AndroidJavaRuntimeApiLevel> | |||
<AndroidJavaRuntimeApiLevel Condition="'$(AndroidJavaRuntimeApiLevel)' == ''">34</AndroidJavaRuntimeApiLevel> |
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.
Should we use $(AndroidLatestStableApiLevel)
here instead, to avoid having to update this every year?
* main: [Mono.Android] Cache `Profiles/api-34.xml` contents (#8679)
* main: [Mono.Android] Cache `Profiles/api-34.xml` contents (#8679)
* main: Bump to dotnet/installer@fb7b9a4b9e 9.0.100-preview.2.24106.6 (#8700) [Mono.Android] Cache `Profiles/api-34.xml` contents (#8679) [monodroid] typemaps may need to load assemblies (#8625) Bump $(AndroidNetPreviousVersion) to 34.0.79 (#8693) Bump to xamarin/java.interop/main@07c73009 (#8681) Bump to dotnet/installer@1c496970b7 9.0.100-preview.2.24078.1 (#8685) [GetAndroidDependencies] Add Jdk dependency info (#8651) [xaprepare] Add support for newer SparkyLinux (#8684)
* main: (116 commits) [tmt] Update to work with current `libxamarin-app.so` (#8694) [Xamarin.Android.Build.Tasks] remove `$(AndroidSupportedAbis)` from `build.props` (#8717) [Xamarin.Android.Build.Tasks] BannedApiAnalyzers for Resolve() (#8715) Bump to xamarin/Java.Interop/main@dfcbd670 (#8714) [monodroid] C++ tweaks and legacy code cleanup (#8638) Bump to xamarin/xamarin-android-tools/main@a698a33 (#8710) [readme] Add `d17-8` download links. (#8709) Bump external/Java.Interop from `07c7300` to `7f08b77` (#8702) Bump to xamarin/monodroid@848d1277b7 (#8691) [Xamarin.Android.Build.Tasks] `FixAbstractMethodsStep` performance (#8650) Bump to dotnet/installer@fb7b9a4b9e 9.0.100-preview.2.24106.6 (#8700) [Mono.Android] Cache `Profiles/api-34.xml` contents (#8679) [monodroid] typemaps may need to load assemblies (#8625) Bump $(AndroidNetPreviousVersion) to 34.0.79 (#8693) Bump to xamarin/java.interop/main@07c73009 (#8681) Bump to dotnet/installer@1c496970b7 9.0.100-preview.2.24078.1 (#8685) [GetAndroidDependencies] Add Jdk dependency info (#8651) [xaprepare] Add support for newer SparkyLinux (#8684) Bump to dotnet/installer@5680e93cb2 9.0.100-preview.2.24073.12 (#8666) $(AndroidPackVersionSuffix)=preview.2; net9 is 34.99.0.preview.2 (#8678) ...
Today, we recalculate the
api.xml
forMono.Android
API-34 on every build.This involves:
class-parse
on every API levelapi-xml-adjuster
on every API levelapi-merge
to merge every level into a singleapi.xml
However, the output ~never changes, as the Android API should not change once it has shipped. Thus, we can save disk space and build time by committing a completed
api.xml
instead of rebuilding it.Additionally,
xaprepare
no longer installs all Android SDK Platforms by default. Instead it defaults to only installing the latest stable version and any unstable preview version(s). New valueall
has been added to the supported-android-sdk-platforms=
command line argument to request all platforms be installed instead.Updated the
HowTo: Add a new Android API Level
document to instruct how to generate a newapi.xml
.This saves: