Skip to content

Commit c09b462

Browse files
committed
Use NativeDependencies property instead to align with AndroidAppBuilder changes
1 parent 65b08e3 commit c09b462

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/mono/sample/iOS-NativeAOT/Program.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
<AppleAppBuilderTask
6666
UseNativeAOTRuntime="$(UseNativeAOTRuntime)"
67-
NativeLibraries="@(NativeLibrary)"
67+
NativeDependencies="@(NativeLibrary)"
6868
TargetOS="$(TargetOS)"
6969
Arch="$(TargetArchitecture)"
7070
ProjectName="$(AppName)"

src/tasks/AppleAppBuilder/AppleAppBuilder.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ public string TargetOS
172172
public bool UseNativeAOTRuntime { get; set; }
173173

174174
/// <summary>
175-
/// List of static libraries to link with the program.
175+
/// Extra native dependencies to link into the app
176176
/// </summary>
177-
public ITaskItem[] NativeLibraries { get; set; } = Array.Empty<ITaskItem>();
177+
public string[] NativeDependencies { get; set; } = Array.Empty<string>();
178178

179179
public void ValidateRuntimeSelection()
180180
{
@@ -272,13 +272,9 @@ public override bool Execute()
272272
}
273273
}
274274

275-
foreach (ITaskItem nativeLibrary in NativeLibraries)
275+
foreach (var nativeDependency in NativeDependencies)
276276
{
277-
string nativeLibraryFile = nativeLibrary.GetMetadata("Identity");
278-
if (!string.IsNullOrEmpty(nativeLibraryFile))
279-
{
280-
assemblerFilesToLink.Add(nativeLibraryFile);
281-
}
277+
assemblerFilesToLink.Add(nativeDependency);
282278
}
283279

284280
if (!ForceInterpreter && (isDevice || ForceAOT) && (assemblerFiles.Count == 0 && !UseNativeAOTRuntime))

0 commit comments

Comments
 (0)