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
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
Project="$(_OutputPath)MonoInfo.props"
Condition="Exists('$(_OutputPath)MonoInfo.props')"
/>
<Import
Project="$(_OutputPath)PackagePaths.props"
Condition="Exists('$(_OutputPath)PackagePaths.props')"
/>
<PropertyGroup>
<!-- Workaround: https://github.com/dotnet/sdk/issues/19050 -->
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
Expand Down
2 changes: 1 addition & 1 deletion GitInfo.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1
6.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32104.313
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.BootstrapTasks", "Java.Interop.BootstrapTasks.csproj", "{47C54705-71BA-455D-9F72-780487DE861C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.BootstrapTasks", "build-tools\Java.Interop.BootstrapTasks\Java.Interop.BootstrapTasks.csproj", "{47C54705-71BA-455D-9F72-780487DE861C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AndroidSdk", "..\..\external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj", "{2F8744CF-C265-440A-B976-DEC021324A3E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AndroidSdk", "external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj", "{2F8744CF-C265-440A-B976-DEC021324A3E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersionInfo", "build-tools\VersionInfo\VersionInfo.csproj", "{D5E50EDC-6CE3-4E8D-85A6-6920DF74E44C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackagePaths", "build-tools\PackagePaths\PackagePaths.csproj", "{0510FC04-44A2-41DE-A208-561DDE9F2AC6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -21,6 +25,14 @@ Global
{2F8744CF-C265-440A-B976-DEC021324A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F8744CF-C265-440A-B976-DEC021324A3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F8744CF-C265-440A-B976-DEC021324A3E}.Release|Any CPU.Build.0 = Release|Any CPU
{D5E50EDC-6CE3-4E8D-85A6-6920DF74E44C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5E50EDC-6CE3-4E8D-85A6-6920DF74E44C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5E50EDC-6CE3-4E8D-85A6-6920DF74E44C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5E50EDC-6CE3-4E8D-85A6-6920DF74E44C}.Release|Any CPU.Build.0 = Release|Any CPU
{0510FC04-44A2-41DE-A208-561DDE9F2AC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0510FC04-44A2-41DE-A208-561DDE9F2AC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0510FC04-44A2-41DE-A208-561DDE9F2AC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0510FC04-44A2-41DE-A208-561DDE9F2AC6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
59 changes: 9 additions & 50 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ NATIVE_EXT = .so
DLLMAP_OS_NAME = linux
endif

PREPARE_EXTERNAL_FILES = \
external/xamarin-android-tools/src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj

DEPENDENCIES = \
bin/Test$(CONFIGURATION)/libNativeTiming$(NATIVE_EXT)

TESTS = \
bin/Test$(CONFIGURATION)/Java.Interop-Tests.dll \
bin/Test$(CONFIGURATION)/Java.Interop.Dynamic-Tests.dll \
Expand All @@ -38,9 +32,10 @@ PTESTS = \
ATESTS = \
bin/Test$(CONFIGURATION)/Android.Interop-Tests.dll

BUILD_PROPS = bin/Build$(CONFIGURATION)/JdkInfo.props bin/Build$(CONFIGURATION)/MonoInfo.props
BUILD_PROPS = bin/Build$(CONFIGURATION)/MonoInfo.props

all: $(DEPENDENCIES) $(TESTS)
all:
$(MSBUILD) $(MSBUILD_FLAGS) Java.Interop.sln

run-all-tests:
r=0; \
Expand All @@ -52,50 +47,19 @@ run-all-tests:

include build-tools/scripts/msbuild.mk

prepare:: $(BUILD_PROPS) src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config

prepare:: prepare-bootstrap
$(MSBUILD) $(MSBUILD_FLAGS) /t:Restore Java.Interop.sln

prepare-bootstrap: prepare-external bin/Build$(CONFIGURATION)/Java.Interop.BootstrapTasks.dll

bin/Build$(CONFIGURATION)/Java.Interop.BootstrapTasks.dll: build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.csproj \
external/xamarin-android-tools/src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj \
$(wildcard build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/*.cs)
$(MSBUILD) $(MSBUILD_FLAGS) /restore "$<"

prepare-external $(PREPARE_EXTERNAL_FILES):
git submodule update --init --recursive
(cd external/xamarin-android-tools && $(MAKE) prepare)
nuget restore
prepare:: $(BUILD_PROPS)
$(MSBUILD) $(MSBUILD_FLAGS) Java.Interop.sln -target:Prepare $(if $(JI_MAX_JDK),-p:MaxJdkVersion=$(JI_MAX_JDK),)

prepare-core: bin/Build$(CONFIGURATION)/MonoInfo.props src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config
prepare-core: bin/Build$(CONFIGURATION)/MonoInfo.props

clean:
-$(MSBUILD) $(MSBUILD_FLAGS) /t:Clean
-rm -Rf bin/$(CONFIGURATION) bin/Build$(CONFIGURATION) bin/Test$(CONFIGURATION)
-rm src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config

include build-tools/scripts/mono.mk
include build-tools/scripts/jdk.mk

JAVA_RUNTIME_ENVIRONMENT_DLLMAP_OVERRIDE = Java.Runtime.Environment.Override.dllmap
ifeq ($(wildcard $(JAVA_RUNTIME_ENVIRONMENT_DLLMAP_OVERRIDE)),)
JAVA_RUNTIME_ENVIRONMENT_DLLMAP_OVERRIDE_CMD = '/@JAVA_RUNTIME_ENVIRONMENT_DLLMAP@/d'
else
JAVA_RUNTIME_ENVIRONMENT_DLLMAP_OVERRIDE_CMD = '/@JAVA_RUNTIME_ENVIRONMENT_DLLMAP@/ {' -e 'r $(JAVA_RUNTIME_ENVIRONMENT_DLLMAP_OVERRIDE)' -e 'd' -e '}'
endif

src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config: src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config.in \
bin/Build$(CONFIGURATION)/JdkInfo.props
sed -e 's#@JI_JVM_PATH@#$(JI_JVM_PATH)#g' -e 's#@OS_NAME@#$(DLLMAP_OS_NAME)#g' -e $(JAVA_RUNTIME_ENVIRONMENT_DLLMAP_OVERRIDE_CMD) < $< > $@
-include bin/Build$(CONFIGURATION)/JdkInfo.mk

JAVA_INTEROP_LIB = libjava-interop$(NATIVE_EXT)
NATIVE_TIMING_LIB = libNativeTiming$(NATIVE_EXT)

bin/Test$(CONFIGURATION)/$(NATIVE_TIMING_LIB): tests/NativeTiming/timing.c $(wildcard $(JI_JDK_INCLUDE_PATHS)/jni.h)
mkdir -p `dirname "$@"`
gcc -g -shared -m64 -fPIC -o $@ $< $(JI_JDK_INCLUDE_PATHS:%=-I%)

# Usage: $(call TestAssemblyTemplate,assembly-basename)
define TestAssemblyTemplate
Expand All @@ -109,7 +73,7 @@ $(eval $(call TestAssemblyTemplate,Java.Interop.Dynamic))
$(eval $(call TestAssemblyTemplate,Java.Interop.Export))
$(eval $(call TestAssemblyTemplate,Java.Interop.Tools.JavaCallableWrappers))

bin/Test$(CONFIGURATION)/Java.Interop-PerformanceTests.dll: $(wildcard tests/Java.Interop-PerformanceTests/*.cs) bin/Test$(CONFIGURATION)/$(NATIVE_TIMING_LIB)
bin/Test$(CONFIGURATION)/Java.Interop-PerformanceTests.dll: $(wildcard tests/Java.Interop-PerformanceTests/*.cs)
$(MSBUILD) $(MSBUILD_FLAGS)
touch $@

Expand Down Expand Up @@ -153,17 +117,12 @@ run-java-source-utils-tests:
bin/Test$(CONFIGURATION)/$(JAVA_INTEROP_LIB): bin/$(CONFIGURATION)/$(JAVA_INTEROP_LIB)
cp $< $@

JRE_DLL_CONFIG=bin/$(CONFIGURATION)/Java.Runtime.Environment.dll.config

$(JRE_DLL_CONFIG): src/Java.Runtime.Environment/Java.Runtime.Environment.csproj
$(MSBUILD) $(MSBUILD_FLAGS) $<

define run-jnimarshalmethod-gen
MONO_TRACE_LISTENER=Console.Out \
$(RUNTIME) bin/$(CONFIGURATION)/jnimarshalmethod-gen.exe -v --jvm "$(JI_JVM_PATH)" -L "$(JI_MONO_LIB_PATH)mono/4.5" -L "$(JI_MONO_LIB_PATH)mono/4.5/Facades" $(2) $(1)
endef

run-test-jnimarshal: bin/Test$(CONFIGURATION)/Java.Interop.Export-Tests.dll bin/Test$(CONFIGURATION)/$(JAVA_INTEROP_LIB) $(JRE_DLL_CONFIG)
run-test-jnimarshal: bin/Test$(CONFIGURATION)/Java.Interop.Export-Tests.dll bin/Test$(CONFIGURATION)/$(JAVA_INTEROP_LIB)
mkdir -p test-jni-output
$(call run-jnimarshalmethod-gen,"$<",-f -o test-jni-output --keeptemp)
(test -f test-jni-output/$(notdir $<) && test -f test-jni-output/Java.Interop.Export-Tests-JniMarshalMethods.dll) || { echo "jnimarshalmethod-gen did not create the expected assemblies in the test-jni-output directory"; exit 1; }
Expand Down
3 changes: 0 additions & 3 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@
<!-- For XliffTasks -->
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" protocolVersion="3" />
</packageSources>
<config>
<add key="globalPackagesFolder" value="packages" />
</config>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Java.Interop.BootstrapTasks
{
public class JdkInfo : Task
{
public string JdksRoot { get; set; }
public string JdkRoot { get; set; }

public string PropertyNameModifier { get; set; } = "";
public string MinimumJdkVersion { get; set; }
Expand Down Expand Up @@ -49,7 +49,7 @@ public override bool Execute ()
.FirstOrDefault ();

if (jdk == null) {
Log.LogError ("Could not determine JAVA_HOME location. Please set JdksRoot or export the JAVA_HOME environment variable.");
Log.LogError ($"Could not determine JAVA_HOME location. Please set {nameof(JdkRoot)} or export the JAVA_HOME environment variable.");
return false;
}

Expand All @@ -75,10 +75,10 @@ XATInfo[] GetJdkRoots ()
{
XATInfo jdk = null;
try {
if (!string.IsNullOrEmpty (JdksRoot))
jdk = new XATInfo (JdksRoot);
if (!string.IsNullOrEmpty (JdkRoot))
jdk = new XATInfo (JdkRoot);
} catch (Exception e) {
Log.LogWarning ($"Could not get information about JdksRoot path `{JdksRoot}`: {e.Message}");
Log.LogWarning ($"Could not get information about {nameof (JdkRoot)} path `{JdkRoot}`: {e.Message}");
Log.LogMessage (MessageImportance.Low, e.ToString ());
}
return jdk == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@

namespace Java.Interop.BootstrapTasks
{
public class GenerateVersionFile : Task
public class ReplaceFileContents : Task
{
public ITaskItem InputFile { get; set; }
public ITaskItem TemplateFile { get; set; }
public ITaskItem OutputFile { get; set; }

public ITaskItem [] Replacements { get; set; }

public override bool Execute ()
{
string text = File.ReadAllText (InputFile.ItemSpec);
string text = File.ReadAllText (TemplateFile.ItemSpec);
foreach (var replacement in Replacements)
{
text = text.Replace (replacement.ItemSpec, replacement.GetMetadata ("Replacement"));
Expand Down
18 changes: 18 additions & 0 deletions build-tools/PackagePaths/PackagePaths.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.Build.NoTargets/2.0.1">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Java.Interop.BootstrapTasks\Java.Interop.BootstrapTasks.csproj" ReferenceOutputAssembly="False" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NUnit.ConsoleRunner" GeneratePathProperty="True" />
</ItemGroup>

<Import Project="PackagePaths.targets" />

</Project>
7 changes: 7 additions & 0 deletions build-tools/PackagePaths/PackagePaths.props.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>

<PropertyGroup>
<PkgNUnit_ConsoleRunner Condition=" '$(PkgNUnit_ConsoleRunner)' == '' ">@CONSOLE_RUNNER_PATH@</PkgNUnit_ConsoleRunner>
</PropertyGroup>

</Project>
20 changes: 20 additions & 0 deletions build-tools/PackagePaths/PackagePaths.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>

<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Java.Interop.BootstrapTasks.dll"
TaskName="Java.Interop.BootstrapTasks.ReplaceFileContents" />

<Target Name="_GeneratePackagePaths"
AfterTargets="Build"
Inputs="PackagePaths.props.in;$(MSBuildThisFileFullPath)"
Outputs="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\PackagePaths.props">
<ItemGroup>
<Replacements Include="@CONSOLE_RUNNER_PATH@" Replacement="$(PkgNUnit_ConsoleRunner)"/>
</ItemGroup>
<ReplaceFileContents
TemplateFile="PackagePaths.props.in"
OutputFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\PackagePaths.props"
Replacements="@(Replacements)"
/>
</Target>

</Project>
20 changes: 20 additions & 0 deletions build-tools/VersionInfo/VersionInfo.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.Build.NoTargets/2.0.1">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netstandard2.0</TargetFramework>
<GitDefaultBranch>main</GitDefaultBranch>
<GitThisAssembly>false</GitThisAssembly>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Java.Interop.BootstrapTasks\Java.Interop.BootstrapTasks.csproj" ReferenceOutputAssembly="False" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitInfo" PrivateAssets="all" />
</ItemGroup>

<Import Project="VersionInfo.targets" />

</Project>
23 changes: 23 additions & 0 deletions build-tools/VersionInfo/VersionInfo.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project>

<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Java.Interop.BootstrapTasks.dll"
TaskName="Java.Interop.BootstrapTasks.ReplaceFileContents" />

<Target Name="GenerateVersionInfo"
AfterTargets="Build"
DependsOnTargets="GitVersion"
Inputs="$(MSBuildThisFileDirectory)..\scripts\Version.props.in;$(MSBuildThisFileFullPath)"
Outputs="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Version.props">
<ItemGroup>
<Replacements Include="@VERSION@" Replacement="$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits)"/>
<Replacements Include="@COMMIT@" Replacement="$(GitCommit)"/>
<Replacements Include="@BRANCH@" Replacement="$(GitBranch)"/>
</ItemGroup>
<ReplaceFileContents
TemplateFile="$(MSBuildThisFileDirectory)..\scripts\Version.props.in"
OutputFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Version.props"
Replacements="@(Replacements)"
/>
</Target>

</Project>
12 changes: 6 additions & 6 deletions build-tools/scripts/Prepare.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
<UsingTask AssemblyFile="$(_TopDir)\bin\Build$(Configuration)\Java.Interop.BootstrapTasks.dll" TaskName="Java.Interop.BootstrapTasks.JdkInfo" />
<Target Name="Prepare">
<Exec Command="git submodule update --init --recursive" WorkingDirectory="$(_TopDir)" />
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\build-tools\Java.Interop.BootstrapTasks\Java.Interop.BootstrapTasks.sln"
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\Java.Interop.BootstrapTasks.sln"
Targets="Restore"
/>
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\build-tools\Java.Interop.BootstrapTasks\Java.Interop.BootstrapTasks.sln"
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\Java.Interop.BootstrapTasks.sln"
Targets="Build"
/>
<PropertyGroup>
<_MaxJdk>$(MaxJdkVersion)</_MaxJdk>
<_MaxJdk Condition=" '$(_MaxJdk)' == '' ">$(JI_MAX_JDK)</_MaxJdk>
<Jdks8Root Condition=" '$(Jdks8Root)' == '' And '$(JAVA_HOME_8_X64)' != '' And Exists($(JAVA_HOME_8_X64)) ">$(JAVA_HOME_8_X64)</Jdks8Root>
<Jdk8Root Condition=" '$(Jdks8Root)' == '' And '$(JAVA_HOME_8_X64)' != '' And Exists($(JAVA_HOME_8_X64)) ">$(JAVA_HOME_8_X64)</Jdk8Root>
</PropertyGroup>
<JdkInfo
JdksRoot="$(Jdks8Root)"
JdkRoot="$(Jdk8Root)"
MakeFragmentFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\JdkInfo.mk"
MaximumJdkVersion="$(_MaxJdk)"
DotnetToolPath="$(DotnetToolPath)"
PropertyFile="$(_TopDir)\bin\Build$(Configuration)\JdkInfo.props">
<Output TaskParameter="JavaHomePath" PropertyName="_JavaSdkDirectory" />
</JdkInfo>
<PropertyGroup>
<Jdks11Root Condition=" '$(Jdks11Root)' == '' And '$(JAVA_HOME_11_X64)' != '' And Exists($(JAVA_HOME_11_X64)) ">$(JAVA_HOME_11_X64)</Jdks11Root>
<Jdk11Root Condition=" '$(Jdks11Root)' == '' And '$(JAVA_HOME_11_X64)' != '' And Exists($(JAVA_HOME_11_X64)) ">$(JAVA_HOME_11_X64)</Jdk11Root>
</PropertyGroup>
<JdkInfo
JdksRoot="$(Jdks11Root)"
JdkRoot="$(Jdk11Root)"
PropertyNameModifier="11"
MinimumJdkVersion="11.0"
MaximumJdkVersion="11.99.0"
Expand Down
6 changes: 5 additions & 1 deletion build-tools/scripts/RunNUnitTests.targets
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="RunTests" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import
Condition=" Exists('..\..\bin\Build$(Configuration)\PackagePaths.props') "
Project="..\..\bin\Build$(Configuration)\PackagePaths.props"
/>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<_TopDir>$(MSBuildThisFileDirectory)..\..</_TopDir>
<_Runtime Condition=" '$(RUNTIME)' != '' ">$(RUNTIME)</_Runtime>
<_Runtime Condition=" '$(RUNTIME)' == '' And '$(OS)' != 'Windows_NT' ">mono --debug</_Runtime>
<_NUnit>$(_Runtime) packages\nunit.consolerunner\3.12.0\tools\nunit3-console.exe</_NUnit>
<_NUnit>$(_Runtime) $(PkgNUnit_ConsoleRunner)/tools/nunit3-console.exe</_NUnit>
<_Run Condition=" '$(RUN)' != '' ">--run=&quot;$(RUN)&quot;</_Run>
</PropertyGroup>
<Import
Expand Down
11 changes: 9 additions & 2 deletions build-tools/scripts/Version.props.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<Project>
<PropertyGroup>
<Version Condition=" '$(Version)' == '' ">@VERSION@</Version>
<InformationalVersion>@VERSION@ git-rev-head:@COMMIT@ git-branch:@BRANCH@</InformationalVersion>
<Company>Microsoft Corporation</Company>
<Copyright>Microsoft Corporation</Copyright>
</PropertyGroup>
</Project>

<Target Name="_SetInformationalVersion"
BeforeTargets="GetAssemblyVersion;GetPackageVersion">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right: https://github.com/dotnet/sdk/blob/2a515cdbd8f6be1b019ae2c8d7f21952592f0697/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateAssemblyInfo.targets#L205-L214

We might want to manually check the Java.Interop.dll in the next java.interop bump? Will we remember?

<PropertyGroup>
<InformationalVersion>$(Version) git-rev-head:@COMMIT@ git-branch:@BRANCH@</InformationalVersion>
</PropertyGroup>
</Target>

</Project>
Loading