Skip to content
Merged
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
301 changes: 301 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,13 @@
<_RunJNIEnvGen Condition=" '$(JIBuildingForNetCoreApp)' == 'True' ">dotnet "$(_JNIEnvGenPath)"</_RunJNIEnvGen>
<_RunJNIEnvGen Condition=" '$(JIBuildingForNetCoreApp)' != 'True' ">$(Runtime) "$(_JNIEnvGenPath)"</_RunJNIEnvGen>
</PropertyGroup>

<!-- Add Roslyn analyzers NuGet to all projects -->
<ItemGroup Condition=" '$(DisableRoslynAnalyzers)' != 'True' ">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Compile Include="..\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings\JavaNativeTypeManager.cs">
<Link>JavaNativeTypeManager.cs</Link>
</Compile>
<Compile Include="..\Java.Interop\NullableAttributes.cs">
<Compile Include="..\utils\NullableAttributes.cs">
<Link>NullableAttributes.cs</Link>
</Compile>
</ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/Java.Interop/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ dotnet_diagnostic.CA2213.severity = error
dotnet_diagnostic.CA2242.severity = error
dotnet_diagnostic.CA2000.severity = error
dotnet_diagnostic.CA2220.severity = error
dotnet_diagnostic.CA1822.severity = error
dotnet_diagnostic.CA2241.severity = error
dotnet_diagnostic.CA1012.severity = error
dotnet_diagnostic.CA1019.severity = error
dotnet_diagnostic.CA1040.severity = error
dotnet_diagnostic.CA1023.severity = error
dotnet_diagnostic.CA1044.severity = error
dotnet_diagnostic.CA1021.severity = error
dotnet_diagnostic.CA1045.severity = error
dotnet_diagnostic.CA1020.severity = error
dotnet_diagnostic.CA1051.severity = error
dotnet_diagnostic.CA1034.severity = error
Expand Down Expand Up @@ -67,7 +64,6 @@ dotnet_diagnostic.CA1027.severity = error
dotnet_diagnostic.CA1005.severity = error
dotnet_diagnostic.CA1004.severity = error
dotnet_diagnostic.CA1000.severity = error
dotnet_diagnostic.CA1002.severity = error
dotnet_diagnostic.CA1006.severity = error
dotnet_diagnostic.CA1010.severity = error
dotnet_diagnostic.CA1007.severity = error
Expand Down
6 changes: 1 addition & 5 deletions src/Java.Interop/Java.Interop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<DefineConstants>DEBUG;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Condition=" '$(TargetFramework)' != 'netstandard2.0' " Remove="NullableAttributes.cs" />
<Compile Condition=" '$(TargetFramework)' == 'netstandard2.0' " Include="..\utils\NullableAttributes.cs" />
<Compile Remove="Java.Interop\JniLocationException.cs" />
</ItemGroup>
<PropertyGroup>
Expand Down Expand Up @@ -49,10 +49,6 @@
<None Include="Documentation\Java.Interop\IJavaPeerable.xml" />
<None Include="Documentation\Java.Interop\JniManagedPeerStates.xml" />
<None Include="Documentation\Java.Interop\JniEnvironment.References.xml" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<ProjectReference Include="..\..\build-tools\jnienv-gen\jnienv-gen.csproj"
ReferenceOutputAssembly="false"
/>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class JavaApiTestHelper
public static JavaApi GetLoadedApi ()
{
var api = new JavaApi ();
using (var xr = XmlReader.Create (ApiPath))
using (var xr = XmlReader.Create (ApiPath, new XmlReaderSettings { XmlResolver = null }))
api.Load (xr, false);
return api;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/generator/ApiVersionsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ApiVersionsProvider
{
public void Parse (string apiVersionsFilePath)
{
using (var reader = XmlReader.Create (apiVersionsFilePath))
using (var reader = XmlReader.Create (apiVersionsFilePath, new XmlReaderSettings { XmlResolver = null }))
Parse (reader);
}

Expand Down
2 changes: 1 addition & 1 deletion tools/generator/CodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static void Run (CodeGeneratorOptions options, DirectoryAssemblyResolver resolve
string apiXmlFile = filename;
string apiSourceAttr = null;

using (var xr = XmlReader.Create (filename)) {
using (var xr = XmlReader.Create (filename, new XmlReaderSettings { XmlResolver = null })) {
xr.MoveToContent ();
apiSourceAttr = xr.GetAttribute ("api-source");
}
Expand Down