Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System.IO;

namespace Xamarin.Android.Prepare
{
class GeneratedJavaInteropConfigPropsFile : GeneratedFile
{
const string Content = @"<?xml version=""1.0"" encoding=""utf-8""?>
<!-- This is a GENERATED FILE -->
<!-- See https://github.com/xamarin/xamarin-android/tree/master/build-tools/xaprepare/xaprepare/Application/GeneratedJavaInteropConfigPropsFile.cs -->
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<PropertyGroup>
<JavaInteropDefineConstants>XA_JI_EXCLUDE</JavaInteropDefineConstants>
</PropertyGroup>
</Project>
";

public GeneratedJavaInteropConfigPropsFile (Context context)
: base (Path.Combine (Configurables.Paths.ExternalJavaInteropDir, "bin", $"Build{context.Configuration}", "XAConfig.props"))
{}

public override void Generate (Context context)
{
var dir = Path.GetDirectoryName (OutputPath);
if (!Directory.Exists (dir))
Directory.CreateDirectory (dir);

using var fs = File.Open (OutputPath, FileMode.Create);
using var sw = new StreamWriter (fs);
sw.Write (Content);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ protected override async Task<bool> Execute (Context context)
var steps = new List <GeneratedFile> {
new GeneratedProfileAssembliesProjitemsFile (Configurables.Paths.ProfileAssembliesProjitemsPath),
new GeneratedMonoAndroidProjitemsFile (),
new GeneratedJavaInteropConfigPropsFile (context),
};

AddOSSpecificSteps (context, steps);
Expand Down
2 changes: 1 addition & 1 deletion external/Java.Interop
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,8 @@ public void CheckIncludedAssemblies ()
"Java.Interop.dll",
"Mono.Android.dll",
"System.Console.dll",
"System.Linq.Expressions.dll",
"System.ObjectModel.dll",
"System.Private.CoreLib.dll",
"System.Collections.Concurrent.dll",
"System.Collections.dll",
"System.Linq.dll",
"UnnamedProject.dll",
} :
Expand Down