-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[msbuild] Promote '_PartialAppManifest' to a public item group ('Part…
…ialAppManifest'). Fixes #10646. (#12417) * A couple of other changes to make sure we never overwrite the PartialAppManifest item group (as opposed to adding to it). * Add tests. Fixes #10646.
- Loading branch information
1 parent
ef6793f
commit aee4cc0
Showing
24 changed files
with
221 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
using Foundation; | ||
|
||
namespace MySimpleApp | ||
{ | ||
public class Program | ||
{ | ||
static int Main (string[] args) | ||
{ | ||
GC.KeepAlive (typeof (NSObject)); // prevent linking away the platform assembly | ||
|
||
Console.WriteLine (Environment.GetEnvironmentVariable ("MAGIC_WORD")); | ||
|
||
return args.Length; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
tests/dotnet/MyPartialAppManifestApp/MacCatalyst/MyPartialAppManifestApp.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0-maccatalyst</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
TOP=../../.. | ||
|
||
include $(TOP)/Make.config | ||
|
||
prepare: | ||
cd .. && $(MAKE) global.json NuGet.config | ||
rm -Rf */bin */obj | ||
|
||
all-ios: prepare | ||
$(DOTNET6) build iOS/*.csproj /bl | ||
|
||
all-mac: prepare | ||
$(DOTNET6) build macOS/*.csproj /bl | ||
|
||
run-mac: | ||
./macOS/bin/Debug/net6.0-macos/osx-x64/$(notdir $(CURDIR)).app/Contents/MacOS/$(notdir $(CURDIR)) | ||
|
||
diag: | ||
cd .. && $(MAKE) global.json NuGet.config | ||
$(DOTNET6) build /v:diag *binlog |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Something</key> | ||
<string>SomeValue</string> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<!-- We need this because some tests will build this project for 32-bit targets --> | ||
<key>MinimumOSVersion</key> | ||
<string>10.0</string></dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
tests/dotnet/MyPartialAppManifestApp/iOS/MyPartialAppManifestApp.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0-ios</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<!-- We need this because we'd otherwise default to the latest macOS version we support (currently 12.0), and we'll want to execute on earlier versions --> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>11.0</string> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
tests/dotnet/MyPartialAppManifestApp/macOS/MyPartialAppManifestApp.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0-macos</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
|
||
<ApplicationTitle>MyPartialAppManifestApp</ApplicationTitle> | ||
<ApplicationId>com.xamarin.mypartialappmanifestapp</ApplicationId> | ||
<ApplicationVersion>3.14</ApplicationVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="../*.cs" /> | ||
<None Include="Info.plist" /> | ||
<PartialAppManifest Include="../Partial.plist" /> | ||
</ItemGroup> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
TOP=../../../.. | ||
include $(TOP)/Make.config | ||
|
||
prepare: | ||
$(Q) $(MAKE) -C $(TOP)/tests/dotnet copy-dotnet-config | ||
|
||
reload: | ||
$(Q) rm -Rf $(TOP)/tests/dotnet/packages | ||
$(Q) $(MAKE) -C $(TOP) -j8 all | ||
$(Q) $(MAKE) -C $(TOP) -j8 install | ||
$(Q) git clean -xfdq | ||
|
||
reload-and-build: | ||
$(Q) $(MAKE) reload | ||
$(Q) $(MAKE) build | ||
|
||
reload-and-run: | ||
$(Q) $(MAKE) reload | ||
$(Q) $(MAKE) run | ||
|
||
build: prepare | ||
$(Q) $(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY) $(BUILD_ARGUMENTS) | ||
|
||
run: prepare | ||
$(Q) $(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY) $(BUILD_ARGUMENTS) -t:Run | ||
|
||
diag: prepare | ||
$(Q) $(DOTNET6) build /v:diag msbuild.binlog |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
tests/dotnet/MyPartialAppManifestApp/tvOS/MyPartialAppManifestApp.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0-tvos</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System.Collections.Generic; | ||
|
||
using NUnit.Framework; | ||
|
||
using Xamarin.Utils; | ||
using Xamarin.MacDev; | ||
|
||
namespace Xamarin.Tests { | ||
public class PartialAppManifestTest : TestBaseClass { | ||
|
||
[Test] | ||
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64")] | ||
public void Build (ApplePlatform platform, string runtimeIdentifiers) | ||
{ | ||
var project = "MyPartialAppManifestApp"; | ||
Configuration.IgnoreIfIgnoredPlatform (platform); | ||
|
||
var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath); | ||
Clean (project_path); | ||
var properties = new Dictionary<string, string> (verbosity); | ||
SetRuntimeIdentifiers (properties, runtimeIdentifiers); | ||
|
||
DotNet.AssertBuild (project_path, properties); | ||
|
||
var infoPlistPath = GetInfoPListPath (platform, appPath); | ||
var infoPlist = PDictionary.FromFile (infoPlistPath); | ||
Assert.AreEqual ("com.xamarin.mypartialappmanifestapp", infoPlist.GetString ("CFBundleIdentifier").Value, "CFBundleIdentifier"); | ||
Assert.AreEqual ("MyPartialAppManifestApp", infoPlist.GetString ("CFBundleDisplayName").Value, "CFBundleDisplayName"); | ||
Assert.AreEqual ("3.14", infoPlist.GetString ("CFBundleVersion").Value, "CFBundleVersion"); | ||
Assert.AreEqual ("3.14", infoPlist.GetString ("CFBundleShortVersionString").Value, "CFBundleShortVersionString"); | ||
Assert.AreEqual ("SomeValue", infoPlist.GetString ("Something").Value, "Something"); | ||
} | ||
} | ||
} |
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
aee4cc0
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.
❌ [CI Build] Tests failed on Build ❌
Tests failed on Build.
API diff
✅ API Diff from stable
View API diff
API & Generator diff
✅ API Diff (from PR only) (no change)
✅ Generator Diff (only version changes)
Packages generated
View packages
Test results
1 tests failed, 232 tests passed.
Failed tests
Pipeline on Agent XAMBOT-1038.BigSur'
[msbuild] Promote '_PartialAppManifest' to a public item group ('PartialAppManifest'). Fixes #10646. (#12417)
aee4cc0
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.
Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.
Pipeline on Agent
[msbuild] Promote '_PartialAppManifest' to a public item group ('PartialAppManifest'). Fixes #10646. (#12417)
aee4cc0
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.
❌ Tests failed on macOS M1 - Mac Big Sur (11.5) ❌
Tests failed on M1 - Mac Big Sur (11.5).
Failed tests are:
Pipeline on Agent
[msbuild] Promote '_PartialAppManifest' to a public item group ('PartialAppManifest'). Fixes #10646. (#12417)
aee4cc0
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.
Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.
Pipeline on Agent
[msbuild] Promote '_PartialAppManifest' to a public item group ('PartialAppManifest'). Fixes #10646. (#12417)