Skip to content

Commit

Permalink
Updates needed to build on net9.0-android RTM.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpobst committed Oct 24, 2024
1 parent 081d100 commit c10e990
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/AndroidXProject.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
- CS0809: Obsolete member 'member' overrides non-obsolete member 'member'
- CS1572: XML comment has a param tag for '', but there is no parameter by that name
- XAOBS001: While this member is 'public', Google considers it internal API and reserves the right to modify or delete it in the future. Use at your own risk.
- NU1605: Detected package downgrade
-->
<NoWarn>0618;0109;0114;0628;0108;0809;1572;XAOBS001</NoWarn>
<NoWarn>0618;0109;0114;0628;0108;0809;1572;XAOBS001;NU1605</NoWarn>

@if (Model.AllowPrereleaseDependencies) {
<!-- Allow this package to have prerelease dependencies -->
Expand Down
9 changes: 9 additions & 0 deletions source/_PackageLevelCustomizations.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,12 @@
<EmbeddedJar Include="..\..\externals\com.xamarin.google.android.play.feature.delivery.extensions\extensions.jar" />
</ItemGroup>
}

@* .NET 9 changes some binding internals that breaks some of our hand bound code. This property reverts
to the old behavior. Once we are .NET 9+ we should redo our hand bound code and remove this. *@
@if (@Model.NuGetPackageId == "Xamarin.AndroidX.Media3.ExoPlayer")
{
<PropertyGroup>
<_AndroidEmitLegacyInterfaceInvokers>true</_AndroidEmitLegacyInterfaceInvokers>
</PropertyGroup>
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,12 @@
public
</attr>

<!-- Workaround generator can't detect this was implemented as an explicitly implemented interface member on a base class -->
<attr
path="/api/package[@name='androidx.paging']/class[@name='PagedList']"
name="skipInvokerMethods"
>
java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection;
</attr>

</metadata>
1 change: 1 addition & 0 deletions source/androidx.work/work-runtime/Transforms/Metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<attr path="/api/package[@name='androidx.work']/class[@name='WorkRequest.Builder']/method[@name='setInputData']" name="managedReturn">AndroidX.Work.WorkRequest.Builder</attr>
<attr path="/api/package[@name='androidx.work']/class[@name='WorkRequest.Builder']/method[@name='setPeriodStartTime']" name="managedReturn">AndroidX.Work.WorkRequest.Builder</attr>
<attr path="/api/package[@name='androidx.work']/class[@name='WorkRequest.Builder']/method[@name='setScheduleRequestedAt']" name="managedReturn">AndroidX.Work.WorkRequest.Builder</attr>
<attr path="/api/package[@name='androidx.work']/class[@name='WorkRequest.Builder']/method[@name='setId']" name="managedReturn">AndroidX.Work.WorkRequest.Builder</attr>

<remove-node
path="/api/package[@name='androidx.work']/class[@name='WorkRequest.Builder']/typeParameters"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,12 @@
path="/api/package[@name='com.google.protobuf']/class[@name='LazyStringArrayList']/method[@name='addAll' and count(parameter)=2 and parameter[1][@type='int'] and parameter[2][@type='java.util.Collection&lt;? extends java.lang.String&gt;']]"
/>

<!-- Workaround generator can't detect this was implemented as an explicitly implemented interface member on a base class -->
<attr
path="/api/package[@name='com.google.protobuf']/class[@name='AbstractProtobufList']"
name="skipInvokerMethods"
>
java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection;
</attr>

</metadata>
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
<remove-node path="/api/package[@name='kotlin.text']/class[@name='StringsKt___StringsKt']/method[@name='filterIndexed' and count(parameter)=2 and parameter[1][@type='java.lang.String'] and parameter[2][@type='kotlin.jvm.functions.Function2&lt;? super java.lang.Integer, ? super java.lang.Character, java.lang.Boolean&gt;']]" />
<remove-node path="/api/package[@name='kotlin.text']/class[@name='StringsKt___StringsKt']/method[@name='filterNot' and count(parameter)=2 and parameter[1][@type='java.lang.String'] and parameter[2][@type='kotlin.jvm.functions.Function1&lt;? super java.lang.Character, java.lang.Boolean&gt;']]" />
<remove-node path="/api/package[@name='kotlin.text']/class[@name='StringsKt___StringsKt']/method[@name='onEach' and count(parameter)=2 and parameter[1][@type='S'] and parameter[2][@type='kotlin.jvm.functions.Function1&lt;? super java.lang.Character, kotlin.Unit&gt;']]/typeParameters" />
<attr path="/api/package[@name='kotlin.text']/class[@name='StringsKt___StringsKt']/method[@name='onEach' and count(parameter)=2 and parameter[1][@type='S'] and parameter[2][@type='kotlin.jvm.functions.Function1&lt;? super java.lang.Character, kotlin.Unit&gt;']]" name="return">java.lang.CharSequence</attr>
<attr path="/api/package[@name='kotlin.text']/class[@name='StringsKt___StringsKt']/method[@name='onEach' and count(parameter)=2 and parameter[1][@type='S'] and parameter[2][@type='kotlin.jvm.functions.Function1&lt;? super java.lang.Character, kotlin.Unit&gt;']]/parameter[1]" name="type">java.lang.CharSequence</attr>
<remove-node path="/api/package[@name='kotlin.text']/class[@name='StringsKt___StringsKt']/method[@name='slice' and count(parameter)=2 and parameter[1][@type='java.lang.String'] and parameter[2][@type='kotlin.ranges.IntRange']]" />
<remove-node path="/api/package[@name='kotlin.text']/class[@name='StringsKt___StringsKt']/method[@name='take' and count(parameter)=2 and parameter[1][@type='java.lang.String'] and parameter[2][@type='int']]" />
Expand Down Expand Up @@ -444,4 +445,26 @@

<remove-node path="/api/package[@name='kotlin.collections.builders']/class[@name='AbstractMapBuilderEntrySet']/method[@name='contains' and count(parameter)=1 and parameter[1][@type='java.lang.Object']]" />

</metadata>
<!-- Workaround generator can't detect this was implemented as an explicitly implemented interface member on a base class -->
<attr
path="/api/package[@name='kotlin.collections']/class[@name='AbstractMutableList']"
name="skipInvokerMethods"
>
java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection;
</attr>

<attr
path="/api/package[@name='kotlin.collections']/class[@name='AbstractList']"
name="skipInvokerMethods"
>
java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection;
</attr>

<!-- Workaround generator doesn't know that `java.util.IList` provides a DIM for this method -->
<attr
path="/api/package[@name='kotlin.collections']/class[@name='AbstractList']"
name="skipInterfaceMethods"
>
java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection;
</attr>
</metadata>

0 comments on commit c10e990

Please sign in to comment.