Skip to content

Commit 9685d79

Browse files
committed
[build] Add make jenkins target.
The `make jenkins` [^0] target is for use by Continuous Integration machines, to build *everything* [^1]. This is expected to take an eternity. Think *hours*. Of particular note is that the above "everything" includes *Release configuration builds* of everything, which is something that didn't actually work before. (Oops.) Bump Java.Interop so that it supports building the Release configuration, update Xamarin.Android.sln so that all required projects are part of the Release configuration, and update Xamarin.Android.Build.Tasks.csproj so that `JCW_ONLY_TYPE_NAMES` isn't defined, as this was preventing compilation. Fix **strip**(1) use: `mono-runtimes.targets` was trying to use `strip -S` on macOS, but the value of `%(_MonoRuntime.Strip)` was quoted, and thus attempted to execute `"strip -S" ...`, which failed. Move the `-S` into a new `%(_MonoRuntime.StripFlags)` value. Fixup `mono-runtimes.targets` and related files so that `$(MonoSourceFullPath)` is used instead of a relative path. This helps alleviate the "mental math" of determining the relative path to the Mono checkout. Plus, the Mono checkout is supposed to be overridable, e.g. commit d205cab, and using `$(MonoSourceFullPath)` supports that. Download and install `android.jar` for all supported API levels. Fix the `Mono.Android.csproj` build so that `Mono.Android.dll` is stored in a per-API-level intermediate directory. Otherwise, if e.g. API-10 is built after API-23, the API-23 version will be installed, but the JCW build will fail. Additionally, API-24 requires using `javac -source 1.8 -target 1.8`, not 1.6. Fix `Mono.Android/metadata` to use the correct `merge.SourceFile` filename of `Profiles/api-24.xml.in`. Without that fix, API-24 won't build because `NumericShaper.GetContextualShaper()` is emitted twice, and the C# compiler doesn't like that. [^0]: https://en.wikipedia.org/wiki/Leeroy_Jenkins [^1]: https://www.youtube.com/watch?v=hooKVstzbz0
1 parent 7002463 commit 9685d79

File tree

12 files changed

+173
-1022157
lines changed

12 files changed

+173
-1022157
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ prepare::
2727
(cd external/Java.Interop && nuget restore)
2828
cp Configuration.Java.Interop.Override.props external/Java.Interop/Configuration.Override.props
2929

30+
include build-tools/scripts/BuildEverything.mk
31+
3032
ifeq ($(OS),Linux)
3133
UBUNTU_DEPS = libzip4 curl openjdk-8-jdk git make automake autoconf libtool unzip vim-common clang lib32stdc++6 lib32z1
3234
LINUX_DISTRO := $(shell lsb_release -i -s || true)

Xamarin.Android.sln

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ Global
8989
Release|AnyCPU = Release|AnyCPU
9090
XAIntegrationDebug|AnyCPU = XAIntegrationDebug|AnyCPU
9191
XAIntegrationRelease|AnyCPU = XAIntegrationRelease|AnyCPU
92+
XAIntegrationDebug|Any CPU = XAIntegrationDebug|Any CPU
93+
XAIntegrationRelease|Any CPU = XAIntegrationRelease|Any CPU
9294
EndGlobalSection
9395
GlobalSection(ProjectConfigurationPlatforms) = postSolution
9496
{3F1F2F50-AF1A-4A5A-BEDB-193372F068D7}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
@@ -117,8 +119,8 @@ Global
117119
{66CF299A-CE95-4131-BCD8-DB66E30C4BF7}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
118120
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
119121
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Debug|AnyCPU.Build.0 = Debug|Any CPU
120-
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.ActiveCfg = Release|AnyCPU
121-
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.Build.0 = Release|AnyCPU
122+
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.ActiveCfg = Release|Any CPU
123+
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.Build.0 = Release|Any CPU
122124
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.XAIntegrationDebug|Any CPU.ActiveCfg = Debug|Any CPU
123125
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
124126
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.XAIntegrationRelease|Any CPU.ActiveCfg = Debug|Any CPU
@@ -133,7 +135,6 @@ Global
133135
{91713046-C358-4647-B162-ED4E1442F3D8}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
134136
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
135137
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Release|AnyCPU.ActiveCfg = Release|Any CPU
136-
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Release|AnyCPU.Build.0 = Release|Any CPU
137138
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.XAIntegrationDebug|Any CPU.ActiveCfg = XAIntegrationDebug|Any CPU
138139
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.XAIntegrationDebug|Any CPU.Build.0 = XAIntegrationDebug|Any CPU
139140
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.XAIntegrationRelease|Any CPU.ActiveCfg = XAIntegrationRelease|Any CPU
@@ -180,16 +181,28 @@ Global
180181
{8A6CB07C-E493-4A4F-AB94-038645A27118}.XAIntegrationRelease|AnyCPU.Build.0 = Debug|Any CPU
181182
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
182183
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Debug|AnyCPU.Build.0 = Debug|Any CPU
184+
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|AnyCPU.ActiveCfg = Release|Any CPU
185+
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|AnyCPU.Build.0 = Release|Any CPU
183186
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
184187
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
188+
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
189+
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Release|AnyCPU.Build.0 = Release|Any CPU
185190
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
186191
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Debug|AnyCPU.Build.0 = Debug|Any CPU
192+
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Release|AnyCPU.ActiveCfg = Release|Any CPU
193+
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Release|AnyCPU.Build.0 = Release|Any CPU
187194
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
188195
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
196+
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
197+
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Release|AnyCPU.Build.0 = Release|Any CPU
189198
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
190199
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Debug|AnyCPU.Build.0 = Debug|Any CPU
200+
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Release|AnyCPU.ActiveCfg = Release|Any CPU
201+
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Release|AnyCPU.Build.0 = Release|Any CPU
191202
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
192203
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Debug|AnyCPU.Build.0 = Debug|Any CPU
204+
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Release|AnyCPU.ActiveCfg = Release|Any CPU
205+
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Release|AnyCPU.Build.0 = Release|Any CPU
193206
{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
194207
{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}.Debug|AnyCPU.Build.0 = Debug|Any CPU
195208
{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}.Release|AnyCPU.ActiveCfg = Release|Any CPU
@@ -216,8 +229,8 @@ Global
216229
{D27AD8F7-7710-40BE-B03B-55EFBEC13C44}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
217230
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
218231
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Debug|AnyCPU.Build.0 = Debug|Any CPU
219-
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.ActiveCfg = Release|AnyCPU
220-
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.Build.0 = Release|AnyCPU
232+
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.ActiveCfg = Release|Any CPU
233+
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.Build.0 = Release|Any CPU
221234
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.XAIntegrationDebug|Any CPU.ActiveCfg = Debug|Any CPU
222235
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
223236
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.XAIntegrationRelease|Any CPU.ActiveCfg = Debug|Any CPU
@@ -364,8 +377,8 @@ Global
364377
{5EB9E888-E357-417E-9F39-DDEC195CE47F}.XAIntegrationRelease|AnyCPU.Build.0 = Debug|Any CPU
365378
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
366379
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Debug|AnyCPU.Build.0 = Debug|Any CPU
367-
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.ActiveCfg = Debug|Any CPU
368-
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.Build.0 = Debug|Any CPU
380+
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.ActiveCfg = Release|Any CPU
381+
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.Build.0 = Release|Any CPU
369382
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.XAIntegrationDebug|Any CPU.ActiveCfg = Debug|Any CPU
370383
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
371384
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.XAIntegrationRelease|Any CPU.ActiveCfg = Debug|Any CPU

build-tools/android-toolchain/android-toolchain.projitems

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,50 @@
3434
<HostOS>Darwin</HostOS>
3535
<DestDir>tools</DestDir>
3636
</AndroidSdkItem>
37-
<AndroidSdkItem Include="platform-24_r01.zip">
37+
<AndroidSdkItem Include="android-2.3.3_r02-linux.zip">
3838
<HostOS></HostOS>
39-
<DestDir>platforms\android-24</DestDir>
39+
<DestDir>platforms\android-10</DestDir>
40+
</AndroidSdkItem>
41+
<AndroidSdkItem Include="android-15_r03.zip">
42+
<HostOS></HostOS>
43+
<DestDir>platforms\android-15</DestDir>
44+
</AndroidSdkItem>
45+
<AndroidSdkItem Include="android-16_r04.zip">
46+
<HostOS></HostOS>
47+
<DestDir>platforms\android-16</DestDir>
48+
</AndroidSdkItem>
49+
<AndroidSdkItem Include="android-17_r02.zip">
50+
<HostOS></HostOS>
51+
<DestDir>platforms\android-17</DestDir>
52+
</AndroidSdkItem>
53+
<AndroidSdkItem Include="android-18_r02.zip">
54+
<HostOS></HostOS>
55+
<DestDir>platforms\android-18</DestDir>
56+
</AndroidSdkItem>
57+
<AndroidSdkItem Include="android-19_r03.zip">
58+
<HostOS></HostOS>
59+
<DestDir>platforms\android-19</DestDir>
60+
</AndroidSdkItem>
61+
<AndroidSdkItem Include="android-20_r02.zip">
62+
<HostOS></HostOS>
63+
<DestDir>platforms\android-20</DestDir>
64+
</AndroidSdkItem>
65+
<AndroidSdkItem Include="android-21_r02.zip">
66+
<HostOS></HostOS>
67+
<DestDir>platforms\android-21</DestDir>
68+
</AndroidSdkItem>
69+
<AndroidSdkItem Include="android-22_r02.zip">
70+
<HostOS></HostOS>
71+
<DestDir>platforms\android-22</DestDir>
4072
</AndroidSdkItem>
4173
<AndroidSdkItem Include="android-23_r01.zip">
4274
<HostOS></HostOS>
4375
<DestDir>platforms\android-23</DestDir>
4476
</AndroidSdkItem>
77+
<AndroidSdkItem Include="platform-24_r01.zip">
78+
<HostOS></HostOS>
79+
<DestDir>platforms\android-24</DestDir>
80+
</AndroidSdkItem>
4581
</ItemGroup>
4682
<ItemGroup>
4783
<_NdkToolchain Include="arm-linux-androideabi-clang" Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains(':armeabi:')) Or $(AndroidSupportedTargetJitAbisForConditionalChecks.Contains(':armeabi-v7a:'))">

build-tools/mono-runtimes/mono-runtimes.projitems

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@
133133
<Ld>ld</Ld>
134134
<LdFlags></LdFlags>
135135
<RanLib>ranlib</RanLib>
136-
<Strip>strip -S</Strip>
136+
<Strip>strip</Strip>
137+
<StripFlags>-S</StripFlags>
137138
<ConfigureFlags>--enable-maintainer-mode --without-ikvm-native --with-monodroid --with-mcs-docs=no --disable-mono-debugger --with-profile2=no --with-profile4=no --with-profile4_5=yes --disable-boehm --enable-nls=no --disable-iconv</ConfigureFlags>
138139
<OutputRuntimeFilename>libmonosgen-2.0</OutputRuntimeFilename>
139140
<NativeLibraryExtension>dylib</NativeLibraryExtension>

build-tools/mono-runtimes/mono-runtimes.targets

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
<PropertyGroup>
44
<_SourceTopDir>..\..</_SourceTopDir>
55
<_BclFrameworkDir>$(OutputPath)\lib\xbuild-frameworks\MonoAndroid\v1.0</_BclFrameworkDir>
6-
<_MonoPath>$(_SourceTopDir)\external\mono</_MonoPath>
7-
<_MonoProfileDir>$(_MonoPath)\mcs\class\lib\monodroid</_MonoProfileDir>
86
</PropertyGroup>
97
<UsingTask AssemblyFile="$(_SourceTopDir)\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.GetNugetPackageBasePath" />
108
<Import Project="$(_SourceTopDir)\Configuration.props" />
9+
<PropertyGroup>
10+
<_MonoProfileDir>$(MonoSourceFullPath)\mcs\class\lib\monodroid</_MonoProfileDir>
11+
</PropertyGroup>
1112
<Import Project="mono-runtimes.props" />
1213
<Import Project="mono-runtimes.projitems" />
1314
<ItemGroup>
@@ -61,24 +62,24 @@
6162
<Target Name="_SetAutogenShTimeToLastCommitTimestamp">
6263
<Exec
6364
Command="touch -m -t `git log -1 --format=%25cd --date=format-local:%25Y%25m%25d%25H%25M.%25S` autogen.sh"
64-
WorkingDirectory="$(_MonoPath)"
65+
WorkingDirectory="$(MonoSourceFullPath)"
6566
/>
6667
</Target>
6768
<Target Name="_Autogen"
6869
DependsOnTargets="_SetAutogenShTimeToLastCommitTimestamp"
69-
Inputs="$(_MonoPath)\autogen.sh"
70-
Outputs="$(_MonoPath)\configure">
70+
Inputs="$(MonoSourceFullPath)\autogen.sh"
71+
Outputs="$(MonoSourceFullPath)\configure">
7172
<Exec
7273
Command="NOCONFIGURE=1 ./autogen.sh"
73-
WorkingDirectory="$(_MonoPath)"
74+
WorkingDirectory="$(MonoSourceFullPath)"
7475
/>
7576
</Target>
7677
<Target Name="_ConfigureRuntimes"
77-
Inputs="$(_MonoPath)\configure"
78+
Inputs="$(MonoSourceFullPath)\configure"
7879
Outputs="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\Makefile')">
7980
<MakeDir Directories="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')" />
8081
<Exec
81-
Command="..\..\..\$(_MonoPath)\configure LDFLAGS=&quot;%(_MonoRuntime.LdFlags)&quot; CFLAGS=&quot;%(_MonoRuntime.CFlags)&quot; CXXFLAGS=&quot;%(_MonoRuntime.CxxFlags)&quot; CC=&quot;%(_MonoRuntime.Cc)&quot; CXX=&quot;%(_MonoRuntime.Cxx)&quot; CPP=&quot;%(_MonoRuntime.Cpp)&quot; CXXCPP=&quot;%(_MonoRuntime.CxxCpp)&quot; LD=&quot;%(_MonoRuntime.Ld)&quot; AR=&quot;%(_MonoRuntime.Ar)&quot; AS=&quot;%(_MonoRuntime.As)&quot; RANLIB=&quot;%(_MonoRuntime.RanLib)&quot; STRIP=&quot;%(_MonoRuntime.Strip)&quot; DLLTOOL=&quot;%(_MonoRuntime.DllTool)&quot; OBJDUMP=&quot;%(_MonoRuntime.Objdump)&quot; --cache-file=..\%(_MonoRuntime.Identity).config.cache %(_MonoRuntime.ConfigureFlags)"
82+
Command="$(MonoSourceFullPath)\configure LDFLAGS=&quot;%(_MonoRuntime.LdFlags)&quot; CFLAGS=&quot;%(_MonoRuntime.CFlags)&quot; CXXFLAGS=&quot;%(_MonoRuntime.CxxFlags)&quot; CC=&quot;%(_MonoRuntime.Cc)&quot; CXX=&quot;%(_MonoRuntime.Cxx)&quot; CPP=&quot;%(_MonoRuntime.Cpp)&quot; CXXCPP=&quot;%(_MonoRuntime.CxxCpp)&quot; LD=&quot;%(_MonoRuntime.Ld)&quot; AR=&quot;%(_MonoRuntime.Ar)&quot; AS=&quot;%(_MonoRuntime.As)&quot; RANLIB=&quot;%(_MonoRuntime.RanLib)&quot; STRIP=&quot;%(_MonoRuntime.Strip)&quot; DLLTOOL=&quot;%(_MonoRuntime.DllTool)&quot; OBJDUMP=&quot;%(_MonoRuntime.Objdump)&quot; --cache-file=..\%(_MonoRuntime.Identity).config.cache %(_MonoRuntime.ConfigureFlags)"
8283
WorkingDirectory="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')"
8384
/>
8485
<Touch
@@ -130,7 +131,7 @@
130131
/>
131132
<Exec
132133
Condition=" '$(Configuration)' != 'Debug' "
133-
Command="&quot;%(_MonoRuntime.Strip)&quot; &quot;$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntimeFilename).%(NativeLibraryExtension)&quot;"
134+
Command="&quot;%(_MonoRuntime.Strip)&quot; %(_MonoRuntime.StripFlags) &quot;$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntimeFilename).%(NativeLibraryExtension)&quot;"
134135
/>
135136
<Touch
136137
Files="@(_InstallRuntimesOutputs);@(_InstallUnstrippedRuntimeOutputs)"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# $(ALL_API_LEVELS) and $(ALL_FRAMEWORKS) must be kept in sync w/ each other
2+
ALL_API_LEVELS = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
3+
# this was different when API Level 21 was "L". Same could happen in the future.
4+
ALL_PLATFORM_IDS = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
5+
# supported api levels
6+
ALL_FRAMEWORKS = _ _ _ _ _ _ _ _ _ v2.3 _ _ _ _ v4.0.3 v4.1 v4.2 v4.3 v4.4 v4.4.87 v5.0 v5.1 v6.0 v7.0
7+
API_LEVELS = 10 15 16 17 18 19 20 21 22 23 24
8+
STABLE_API_LEVELS = 10 15 16 17 18 19 20 21 22 23
9+
10+
FRAMEWORKS = $(foreach a, $(API_LEVELS), $(word $(a),$(ALL_FRAMEWORKS)))
11+
STABLE_FRAMEWORKS = $(foreach a, $(STABLE_API_LEVELS), $(word $(a),$(ALL_FRAMEWORKS)))
12+
PLATFORM_IDS = $(foreach a, $(API_LEVELS), $(word $(a),$(ALL_PLATFORM_IDS)))
13+
14+
ALL_JIT_ABIS = \
15+
armeabi \
16+
armeabi-v7a \
17+
arm64-v8a \
18+
x86 \
19+
x86_64
20+
21+
ALL_HOST_ABIS = \
22+
$(shell uname) \
23+
mxe-Win64
24+
25+
26+
_space :=
27+
_space +=
28+
29+
# usage: $(call join-with,SEPARATOR,LIST)
30+
# Joins elements of LISt with SEPARATOR.
31+
join-with = $(subst $(_space),$(1),$(strip $(2)))
32+
33+
34+
_MSBUILD_ARGS = \
35+
/p:AndroidSupportedTargetJitAbis=$(call join-with,:,$(ALL_JIT_ABIS)) \
36+
/p:AndroidSupportedHostJitAbis=$(call join-with,:,$(ALL_HOST_ABIS))
37+
38+
TASK_ASSEMBLIES = \
39+
bin/Debug/lib/xbuild/Xamarin/Android/Xamarin.Android.Build.Tasks.dll \
40+
bin/Release/lib/xbuild/Xamarin/Android/Xamarin.Android.Build.Tasks.dll
41+
42+
RUNTIME_LIBRARIES = \
43+
$(ALL_JIT_ABIS:%=bin/Debug/lib/xbuild/Xamarin/Android/lib/%/libmonosgen-2.0.so) \
44+
$(ALL_JIT_ABIS:%=bin/Release/lib/xbuild/Xamarin/Android/lib/%/libmonosgen-2.0.so)
45+
46+
FRAMEWORK_ASSEMBLIES = \
47+
$(FRAMEWORKS:%=bin/Debug/lib/xbuild-frameworks/MonoAndroid/%/Mono.Android.dll) \
48+
$(FRAMEWORKS:%=bin/Release/lib/xbuild-frameworks/MonoAndroid/%/Mono.Android.dll)
49+
50+
leeroy jenkins: prepare $(RUNTIME_LIBRARIES) $(TASK_ASSEMBLIES) $(FRAMEWORK_ASSEMBLIES)
51+
52+
$(TASK_ASSEMBLIES): bin/%/lib/xbuild/Xamarin/Android/Xamarin.Android.Build.Tasks.dll:
53+
$(MSBUILD) /p:Configuration=$* $(_MSBUILD_ARGS)
54+
55+
$(FRAMEWORK_ASSEMBLIES):
56+
$(foreach a, $(API_LEVELS), \
57+
$(MSBUILD) src/Mono.Android/Mono.Android.csproj /p:Configuration=Debug $(_MSBUILD_ARGS) /p:AndroidApiLevel=$(a) /p:AndroidFrameworkVersion=$(word $(a), $(ALL_FRAMEWORKS)); \
58+
$(MSBUILD) src/Mono.Android/Mono.Android.csproj /p:Configuration=Release $(_MSBUILD_ARGS) /p:AndroidApiLevel=$(a) /p:AndroidFrameworkVersion=$(word $(a), $(ALL_FRAMEWORKS)); )
59+
60+
$(RUNTIME_LIBRARIES):
61+
$(MSBUILD) /p:Configuration=Debug $(_MSBUILD_ARGS)
62+
$(MSBUILD) /p:Configuration=Release $(_MSBUILD_ARGS)

external/Java.Interop

src/Mono.Android/Mono.Android.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,11 @@
296296
<Import Project="$(JavaInteropFullPath)\src\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings.projitems" Label="Shared" Condition="Exists('$(JavaInteropFullPath)\src\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings.projitems')" />
297297
<Import Project="$(JavaInteropFullPath)\src\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems" Label="Shared" Condition="Exists('$(JavaInteropFullPath)\src\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems')" />
298298
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
299+
<PropertyGroup>
300+
<IntermediateOutputPath>$(IntermediateOutputPath)android-$(AndroidApiLevel)\</IntermediateOutputPath>
301+
</PropertyGroup>
299302
<Import Project="Mono.Android.targets" />
300-
<Import Project="$(IntermediateOutputPath)android-$(AndroidApiLevel)\Mono.Android.projitems" Condition="Exists('$(IntermediateOutputPath)android-$(AndroidApiLevel)\Mono.Android.projitems')" />
303+
<Import Project="$(IntermediateOutputPath)mcw\Mono.Android.projitems" Condition="Exists('$(IntermediateOutputPath)mcw\Mono.Android.projitems')" />
301304
<ItemGroup>
302305
<ProjectReference Include="..\..\build-tools\api-merge\api-merge.csproj">
303306
<Project>{3FC3E78B-F7D4-42EA-BBE8-4535DF42BFF8}</Project>

0 commit comments

Comments
 (0)