[mmp] Don't apply libintl hack when you explicitly ask for that file (#5855)

- A long while ago, this hack was added to mmp:

 	// Shutup the warning until we decide on bug: 36478
	if (shortendName.ToLowerInvariant () == "intl" && IsUnifiedFullXamMacFramework)

- This breaks use cases were we explicitly ask for that file, so let's
fix that for now until we can fix the root cause for real
This commit is contained in:
Chris Hamons 2019-04-08 10:26:23 -05:00 коммит произвёл GitHub
Родитель a9dc0c9120
Коммит d98c22e39f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -210,5 +210,20 @@ namespace Xamarin.MMP.Tests
NativeReferenceTestCore (tmpDir, test, "MultipleNativeReferences_OnlyInvokeMMPOneTime_AndCopyEverythingIn", null, true);
});
}
[Test]
public void ReferenceNativeRefNoCodeUsage_ShouldStillCopy ()
{
MMPTests.RunMMPTest (tmpDir => {
TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) {
XM45 = true,
ItemGroup = CreateSingleNativeRef ("/Library/Frameworks/Mono.framework/Libraries/libintl.dylib", "Dynamic")
};
var log = TI.TestUnifiedExecutable (test);
Console.WriteLine (log.BuildOutput);
Assert.True (File.Exists (Path.Combine (tmpDir, "bin/Debug/XM45Example.app/Contents/MonoBundle/libintl.dylib")));
});
}
}
}

Просмотреть файл

@ -1616,7 +1616,7 @@ namespace Xamarin.Bundler {
return true;
}
// Shutup the warning until we decide on bug: 36478
if (shortendName.ToLowerInvariant () == "intl" && IsUnifiedFullXamMacFramework)
if (shortendName.ToLowerInvariant () == "intl" && !native_references.Any (x => x.Contains ("libintl.dylib")) && IsUnifiedFullXamMacFramework)
return true;
return false;
}