Skip to content

Commit c3a21d9

Browse files
authored
Bump to xamarin/java.interop/main@8f7ddcdd (#6232)
Fixes: #6271 Context: 2d81740 Context: #5749 Context: dotnet/java-interop@d16b1e5 Changes: dotnet/java-interop@f359e73...8f7ddcd * dotnet/java-interop@8f7ddcdd: [build] Fix 'BuildVersionInfo_g_cs' build target. (#881) * dotnet/java-interop@7068f4b2: [build] Enable string operations globalization code analyzers. (#879) * dotnet/java-interop@3e6a6232: [build] Use GitInfo to Generate Version information. (#875) In order to better support building solutions which reference both .NET 6 and legacy projects within Visual Studio, we have begun strong-naming all the MSBuild-related assemblies; see also 2d81740. This allows loading two different version of the "same" assembly, e.g. `Java.Interop.Tools.Diagnostics.dll`, from two different filesystem locations in the same AppDomain/AssemblyLoadContext. However, strong-naming is only part of the solution. The other part is that, for sanity and reliability, the "two different versions of the 'same' assembly" should *also* have different assembly *versions*. If they have the same assembly version, are they truly different? Multiple sub-modules have been updated to use the [`GitInfo`][0] [NuGet Package][1] so that assembly versions are unique per-commit: * `external/xamarin-android-tools`: 25c5cb5 * `.external` & `monodroid`: 2d81740 Update the `external/Java.Interop` submodule to follow suit. This in turn requires updates to `xaprepare` and the CI YAML files to ensure that `GitInfo` is configured correctly within Java.Interop. [0]: https://github.com/devlooped/GitInfo [1]: https://www.nuget.org/packages/GitInfo/2.1.2
1 parent c09f505 commit c3a21d9

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

build-tools/automation/azure-pipelines-oss.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ stages:
174174

175175
- template: yaml-templates/setup-ubuntu.yaml
176176

177+
- script: make prepare V=1 PREPARE_CI_PR=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration)
178+
displayName: make prepare
179+
177180
- script: make jenkins V=1 PREPARE_CI_PR=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration)
178181
displayName: make jenkins
179182

build-tools/automation/azure-pipelines.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@ stages:
437437
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
438438
displayName: make prepare-external-git-dependencies
439439

440+
- script: make prepare PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration)
441+
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
442+
displayName: make prepare
443+
440444
- script: make jenkins V=1 PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration)
441445
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
442446
displayName: make jenkins

build-tools/scripts/msbuild.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ ifeq ($(MSBUILD),msbuild)
3737
export USE_MSBUILD = 1
3838
endif # $(MSBUILD) == msbuild
3939

40+
ifneq ($(V),0)
41+
MSBUILD_FLAGS += /v:diag
42+
endif # $(V) != 0
43+
4044
ifeq ($(USE_MSBUILD),1)
4145

4246
# $(call MSBUILD_BINLOG,name,msbuild=$(MSBUILD),outdir=Build)
4347
define MSBUILD_BINLOG
44-
$(if $(2),$(2),$(MSBUILD)) $(MSBUILD_FLAGS) /v:normal \
48+
$(if $(2),$(2),$(MSBUILD)) $(MSBUILD_FLAGS) \
4549
/binaryLogger:"$(dir $(realpath $(firstword $(MAKEFILE_LIST))))/bin/$(if $(3),$(3),Build)$(CONFIGURATION)/msbuild-`date +%Y%m%dT%H%M%S`-$(1).binlog"
4650
endef
4751

@@ -59,10 +63,6 @@ else # $(_CSC_EMITS_PDB) == ''
5963
MSBUILD_FLAGS += /p:_DebugFileExt=.mdb
6064
endif # $(_CSC_EMITS_PDB) == Pdb
6165

62-
ifneq ($(V),0)
63-
MSBUILD_FLAGS += /v:diag
64-
endif # $(V) != 0
65-
6666
# $(call MSBUILD_BINLOG,name,msbuild=$(MSBUILD))
6767
define MSBUILD_BINLOG
6868
$(if $(2),$(2),$(MSBUILD)) $(MSBUILD_FLAGS)

build-tools/xaprepare/xaprepare/Steps/Step_PrepareExternalJavaInterop.Windows.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ partial class Step_PrepareExternalJavaInterop
99
#pragma warning disable CS1998
1010
async Task<bool> ExecuteOSSpecific (Context context)
1111
{
12+
string javaInteropDir = context.Properties.GetRequiredValue (KnownProperties.JavaInteropFullPath);
13+
string projectPath = Path.Combine (javaInteropDir, "build-tools", "Java.Interop.BootstrapTasks", "Java.Interop.BootstrapTasks.csproj");
14+
var msbuild = new MSBuildRunner (context);
15+
bool result = await msbuild.Run (
16+
projectPath: projectPath,
17+
logTag: "java-interop-prepare",
18+
binlogName: "build-java-interop-prepare"
19+
);
20+
21+
if (!result) {
22+
Log.ErrorLine ("Failed to build java-interop-prepare");
23+
return false;
24+
}
1225
return true;
1326
}
1427
#pragma warning restore CS1998

external/Java.Interop

0 commit comments

Comments
 (0)