Skip to content

Commit 6ccdfa1

Browse files
committed
Use an updated generator.
1 parent 6b90d1e commit 6ccdfa1

13 files changed

Lines changed: 327 additions & 142 deletions

File tree

Directory.Build.props

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
<RepositoryCommit>$(BUILD_SOURCEVERSION)</RepositoryCommit>
77

88
<!-- Default TFM's we build for -->
9-
<_DefaultTargetFrameworks>MonoAndroid12.0;net6.0-android</_DefaultTargetFrameworks>
9+
<_DefaultTargetFrameworks>MonoAndroid12.0;net6.0-android;net7.0-android</_DefaultTargetFrameworks>
1010

11+
<!-- Use an updated 'generator' -->
12+
<!--<_BindingsToolsLocation>$(MSBuildThisFileDirectory)/java.interop/bin/Release-net7.0/</_BindingsToolsLocation>-->
13+
<_BindingsToolsLocation>$(MSBuildThisFileDirectory)/tools/Microsoft.Android.Sdk.Windows.34.0.0-rc.2.479/tools/</_BindingsToolsLocation>
14+
1115
<!-- Enable DIM/SIM for Classic (defaults to true on .NET) -->
1216
<AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>true</AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>
1317

@@ -37,20 +41,26 @@
3741
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
3842
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
3943
<PackageProjectUrl>https://aka.ms/androidx</PackageProjectUrl>
40-
</PropertyGroup>
4144

45+
<!-- Exclude TF-specific transform files by default -->
46+
<DefaultTransformExcludes>**/*.MonoAndroid12.0.xml;**/*.net6.0-android.xml;**/*.net7.0-android.xml</DefaultTransformExcludes>
47+
</PropertyGroup>
48+
4249
<!-- Folders that .targets files need to go into -->
4350
<ItemGroup>
4451
<AndroidXNuGetTargetFolders Include="build\monoandroid12.0" />
4552
<AndroidXNuGetTargetFolders Include="build\net6.0-android31.0" />
53+
<AndroidXNuGetTargetFolders Include="build\net7.0-android33.0" />
4654
<AndroidXNuGetTargetFolders Include="buildTransitive\monoandroid12.0" />
4755
<AndroidXNuGetTargetFolders Include="buildTransitive\net6.0-android31.0" />
56+
<AndroidXNuGetTargetFolders Include="buildTransitive\net7.0-android33.0" />
4857
</ItemGroup>
4958

5059
<!-- Folders that _._ files need to go into for packages without managed libraries -->
5160
<ItemGroup>
5261
<AndroidXNuGetLibFolders Include="lib\monoandroid12.0" />
5362
<AndroidXNuGetLibFolders Include="lib\net6.0-android31.0" />
63+
<AndroidXNuGetLibFolders Include="lib\net7.0-android33.0" />
5464
</ItemGroup>
5565

5666
<ItemGroup>

build.cake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Tools needed by cake addins
22
#tool nuget:?package=Cake.CoreCLR
33
#tool nuget:?package=vswhere&version=3.1.1
4+
#tool nuget:?package=Microsoft.Android.Sdk.Windows&version=34.0.0-rc.2.479
45

56
// Cake Addins
67
#addin nuget:?package=Cake.FileHelpers&version=5.0.0

build/ci/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ parameters:
99
windowsImage: 'windows-latest' # the name of the Windows VM image
1010

1111
# Tool Parameters
12-
dotnetVersion: '7.0.306' # the version of .NET to use
12+
dotnetVersion: '7.0.403' # the version of .NET to use
1313
dotnetWorkloadRollbackFile: 'workloads.json'
1414
dotnetWorkloadSource: 'https://aka.ms/dotnet6/nuget/index.json'
1515
dotnetNuGetOrgSource: 'https://api.nuget.org/v3/index.json'
1616
classicXAPkg: https://aka.ms/xamarin-android-commercial-d17-4-macos
1717
classicXAVsix: https://aka.ms/xamarin-android-commercial-d17-4-windows
1818
skipUnitTests: false # do not run unit test step
19+
JICommit: 5adb4d487279d52dc10055f31bd1da9e1efab3ef # The commit of Java.Interop to use
1920

2021
tools: # a list of additional .NET global tools needed
2122
- 'xamarin.androidbinderator.tool': '0.5.7'
@@ -33,7 +34,7 @@ parameters:
3334
publishOutputSuffix: '' # the artifact suffix to use when publishing the output folder
3435
signListPath: 'SignList.xml' # the path to the SignList.xml to copy into the nuget artifact for signing
3536
artifactsPath: 'output' # the path to the NuGet packages that need to be signed, verified and published
36-
37+
3738
jobs:
3839
- job: ${{ parameters.name }}
3940
strategy:
@@ -66,6 +67,10 @@ jobs:
6667
dotnetTools: ${{ parameters.tools }}
6768
classicInstallerUrl: $(classicInstallerUrl)
6869

70+
#- template: update-generator.yml
71+
# parameters:
72+
# JICommit: ${{ parameters.JICommit }}
73+
6974
- template: build-and-test.yml
7075
parameters:
7176
artifactsPath: ${{ parameters.artifactsPath }}

build/ci/update-generator.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
parameters:
2+
condition: succeeded()
3+
JICommit: # The commit of Java.Interop to use
4+
5+
steps:
6+
- pwsh: git clone --recurse-submodules https://github.com/xamarin/java.interop.git
7+
8+
- pwsh: git switch androidx-generator
9+
workingDirectory: java.interop
10+
11+
- task: DotNetCoreCLI@2
12+
displayName: Prepare Solution
13+
inputs:
14+
projects: java.interop/Java.Interop.sln
15+
arguments: '-c Release -target:Prepare'
16+
17+
- task: DotNetCoreCLI@2
18+
displayName: Shut down existing build server
19+
inputs:
20+
command: custom
21+
custom: build-server
22+
arguments: shutdown
23+
24+
- task: DotNetCoreCLI@2
25+
displayName: Build Solution
26+
inputs:
27+
projects: java.interop/Java.Interop.sln
28+
arguments: '-c Release'

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk":
33
{
4-
"version": "7.0.306",
4+
"version": "7.0.403",
55
"rollForward": "patch"
66
},
77
"msbuild-sdks":

source/AndroidXProject.cshtml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@
126126
<TransformFile Include="..\..\source\Metadata.common.xml" >
127127
<Link>Transforms/Metadata.common.xml</Link>
128128
</TransformFile>
129-
<TransformFile Include="..\..\source\@(Model.MavenGroupId)\@(Model.Name)\Transforms\*.xml">
129+
<TransformFile Include="..\..\source\@(Model.MavenGroupId)\@(Model.Name)\Transforms\*.xml" Exclude="$(DefaultTransformExcludes)">
130+
<Link>Transforms/%(RecursiveDir)/%(Filename)%(Extension)</Link>
131+
</TransformFile>
132+
<TransformFile Include="..\..\source\@(Model.MavenGroupId)\@(Model.Name)\Transforms\*.$(TargetFramework).xml">
130133
<Link>Transforms/%(RecursiveDir)/%(Filename)%(Extension)</Link>
131134
</TransformFile>
132135
<AndroidJavaSource

source/Xamarin.Kotlin.StdLib/Additions/InterfacesFixups.cs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
namespace Kotlin.Collections
1+
using Java.Lang;
2+
using Java.Util;
3+
4+
namespace Kotlin.Collections
25
{
36
// TODO: Remove these fixes when this bug is fixed:
47
// https://github.com/xamarin/java.interop/issues/470
@@ -11,3 +14,22 @@ partial class AbstractListInvoker : Java.Util.IList
1114
{
1215
}
1316
}
17+
18+
#if NET7_0_OR_GREATER
19+
namespace Kotlin.Collections.Builders
20+
{
21+
public partial class MapBuilder
22+
{
23+
int IMap.Size () => Size;
24+
25+
global::System.Collections.ICollection IMap.Values () => Values;
26+
}
27+
28+
public partial class MapBuilderEntries
29+
{
30+
public override bool Add (Object? element) => Add ((IMapEntry) element!);
31+
32+
public override int GetSize () => Size;
33+
}
34+
}
35+
#endif

source/Xamarin.Kotlin.StdLib/Transforms/Metadata.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,4 +442,5 @@
442442
Kotlin.Time.ITimeMark
443443
</attr>
444444

445+
<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']]" />
445446
</metadata>
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<metadata>
2+
<add-node
3+
path="/api/package[@name='com.google.crypto.tink.signature']/class[@name='EcdsaPrivateKey']"
4+
>
5+
<method
6+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Key" name="getPublicKey"
7+
deprecated="not deprecated" final="false" bridge="false" native="false"
8+
synchronized="false" synthetic="false"
9+
/>
10+
</add-node>
11+
<add-node
12+
path="/api/package[@name='com.google.crypto.tink.signature']/class[@name='EcdsaPublicKey']"
13+
>
14+
<method
15+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Parameters" name="getParameters"
16+
deprecated="not deprecated" final="false" bridge="false" native="false"
17+
synchronized="false" synthetic="false"
18+
/>
19+
</add-node>
20+
<add-node
21+
path="/api/package[@name='com.google.crypto.tink.prf']/class[@name='HkdfPrfKey']"
22+
>
23+
<method
24+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Parameters" name="getParameters"
25+
deprecated="not deprecated" final="false" bridge="false" native="false"
26+
synchronized="false" synthetic="false"
27+
/>
28+
</add-node>
29+
<add-node
30+
path="/api/package[@name='com.google.crypto.tink.streamingaead']/class[@name='AesGcmHkdfStreamingKey']"
31+
>
32+
<method
33+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Parameters" name="getParameters"
34+
deprecated="not deprecated" final="false" bridge="false" native="false"
35+
synchronized="false" synthetic="false"
36+
/>
37+
</add-node>
38+
<add-node
39+
path="/api/package[@name='com.google.crypto.tink.streamingaead']/class[@name='AesCtrHmacStreamingKey']"
40+
>
41+
<method
42+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Parameters" name="getParameters"
43+
deprecated="not deprecated" final="false" bridge="false" native="false"
44+
synchronized="false" synthetic="false"
45+
/>
46+
</add-node>
47+
<add-node
48+
path="/api/package[@name='com.google.crypto.tink.signature']/class[@name='RsaSsaPkcs1PublicKey']"
49+
>
50+
<method
51+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Parameters" name="getParameters"
52+
deprecated="not deprecated" final="false" bridge="false" native="false"
53+
synchronized="false" synthetic="false"
54+
/>
55+
</add-node>
56+
<add-node
57+
path="/api/package[@name='com.google.crypto.tink.signature']/class[@name='Ed25519PublicKey']"
58+
>
59+
<method
60+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Parameters" name="getParameters"
61+
deprecated="not deprecated" final="false" bridge="false" native="false"
62+
synchronized="false" synthetic="false"
63+
/>
64+
</add-node>
65+
<add-node
66+
path="/api/package[@name='com.google.crypto.tink.prf']/class[@name='AesCmacPrfKey']"
67+
>
68+
<method
69+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Parameters" name="getParameters"
70+
deprecated="not deprecated" final="false" bridge="false" native="false"
71+
synchronized="false" synthetic="false"
72+
/>
73+
</add-node>
74+
<add-node
75+
path="/api/package[@name='com.google.crypto.tink.prf']/class[@name='HmacPrfKey']"
76+
>
77+
<method
78+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Parameters" name="getParameters"
79+
deprecated="not deprecated" final="false" bridge="false" native="false"
80+
synchronized="false" synthetic="false"
81+
/>
82+
</add-node>
83+
<add-node
84+
path="/api/package[@name='com.google.crypto.tink.signature']/class[@name='Ed25519PrivateKey']"
85+
>
86+
<method
87+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Key" name="getPublicKey"
88+
deprecated="not deprecated" final="false" bridge="false" native="false"
89+
synchronized="false" synthetic="false"
90+
/>
91+
</add-node>
92+
<add-node
93+
path="/api/package[@name='com.google.crypto.tink.signature']/class[@name='RsaSsaPkcs1PrivateKey']"
94+
>
95+
<method
96+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Key" name="getPublicKey"
97+
deprecated="not deprecated" final="false" bridge="false" native="false"
98+
synchronized="false" synthetic="false"
99+
/>
100+
</add-node>
101+
<add-node
102+
path="/api/package[@name='com.google.crypto.tink.signature']/class[@name='RsaSsaPssPrivateKey']"
103+
>
104+
<method
105+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Key" name="getPublicKey"
106+
deprecated="not deprecated" final="false" bridge="false" native="false"
107+
synchronized="false" synthetic="false"
108+
/>
109+
</add-node>
110+
<add-node
111+
path="/api/package[@name='com.google.crypto.tink.signature']/class[@name='RsaSsaPssPublicKey']"
112+
>
113+
<method
114+
visibility="public" static="false" abstract="false" return="com.google.crypto.tink.Parameters" name="getParameters"
115+
deprecated="not deprecated" final="false" bridge="false" native="false"
116+
synchronized="false" synthetic="false"
117+
/>
118+
</add-node>
119+
</metadata>

0 commit comments

Comments
 (0)