Skip to content

Commit 474cd32

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*. $ time make jenkins ... real 130m11.608s user 97m22.220s sys 18m20.522s 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. Disable use of `-lz` when building for Windows. Windows doesn't contain a `Z.DLL` to link against. [^0]: https://en.wikipedia.org/wiki/Leeroy_Jenkins [^1]: https://www.youtube.com/watch?v=hooKVstzbz0
1 parent 70655d8 commit 474cd32

File tree

12 files changed

+175
-1022159
lines changed

12 files changed

+175
-1022159
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ prepare::
2828
cp Configuration.Java.Interop.Override.props external/Java.Interop/Configuration.Override.props
2929
cp `$(MSBUILD) /nologo /v:minimal /t:GetMonoSourceFullPath build-tools/scripts/Paths.targets`/mcs/class/msfinal.pub .
3030

31+
include build-tools/scripts/BuildEverything.mk
32+
3133
ifeq ($(OS),Linux)
3234
UBUNTU_DEPS = libzip4 curl openjdk-8-jdk git make automake autoconf libtool unzip vim-common clang lib32stdc++6 lib32z1
3335
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
@@ -91,6 +91,8 @@ Global
9191
Release|AnyCPU = Release|AnyCPU
9292
XAIntegrationDebug|AnyCPU = XAIntegrationDebug|AnyCPU
9393
XAIntegrationRelease|AnyCPU = XAIntegrationRelease|AnyCPU
94+
XAIntegrationDebug|Any CPU = XAIntegrationDebug|Any CPU
95+
XAIntegrationRelease|Any CPU = XAIntegrationRelease|Any CPU
9496
EndGlobalSection
9597
GlobalSection(ProjectConfigurationPlatforms) = postSolution
9698
{3F1F2F50-AF1A-4A5A-BEDB-193372F068D7}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
@@ -119,8 +121,8 @@ Global
119121
{66CF299A-CE95-4131-BCD8-DB66E30C4BF7}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
120122
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
121123
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Debug|AnyCPU.Build.0 = Debug|Any CPU
122-
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.ActiveCfg = Release|AnyCPU
123-
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.Build.0 = Release|AnyCPU
124+
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.ActiveCfg = Release|Any CPU
125+
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.Build.0 = Release|Any CPU
124126
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.XAIntegrationDebug|Any CPU.ActiveCfg = Debug|Any CPU
125127
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
126128
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.XAIntegrationRelease|Any CPU.ActiveCfg = Debug|Any CPU
@@ -135,7 +137,6 @@ Global
135137
{91713046-C358-4647-B162-ED4E1442F3D8}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
136138
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
137139
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Release|AnyCPU.ActiveCfg = Release|Any CPU
138-
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Release|AnyCPU.Build.0 = Release|Any CPU
139140
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.XAIntegrationDebug|Any CPU.ActiveCfg = XAIntegrationDebug|Any CPU
140141
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.XAIntegrationDebug|Any CPU.Build.0 = XAIntegrationDebug|Any CPU
141142
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.XAIntegrationRelease|Any CPU.ActiveCfg = XAIntegrationRelease|Any CPU
@@ -182,16 +183,28 @@ Global
182183
{8A6CB07C-E493-4A4F-AB94-038645A27118}.XAIntegrationRelease|AnyCPU.Build.0 = Debug|Any CPU
183184
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
184185
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Debug|AnyCPU.Build.0 = Debug|Any CPU
186+
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|AnyCPU.ActiveCfg = Release|Any CPU
187+
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|AnyCPU.Build.0 = Release|Any CPU
185188
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
186189
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
190+
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
191+
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Release|AnyCPU.Build.0 = Release|Any CPU
187192
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
188193
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Debug|AnyCPU.Build.0 = Debug|Any CPU
194+
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Release|AnyCPU.ActiveCfg = Release|Any CPU
195+
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Release|AnyCPU.Build.0 = Release|Any CPU
189196
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
190197
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
198+
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
199+
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Release|AnyCPU.Build.0 = Release|Any CPU
191200
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
192201
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Debug|AnyCPU.Build.0 = Debug|Any CPU
202+
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Release|AnyCPU.ActiveCfg = Release|Any CPU
203+
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Release|AnyCPU.Build.0 = Release|Any CPU
193204
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
194205
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Debug|AnyCPU.Build.0 = Debug|Any CPU
206+
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Release|AnyCPU.ActiveCfg = Release|Any CPU
207+
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Release|AnyCPU.Build.0 = Release|Any CPU
195208
{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
196209
{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}.Debug|AnyCPU.Build.0 = Debug|Any CPU
197210
{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}.Release|AnyCPU.ActiveCfg = Release|Any CPU
@@ -218,8 +231,8 @@ Global
218231
{D27AD8F7-7710-40BE-B03B-55EFBEC13C44}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
219232
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
220233
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Debug|AnyCPU.Build.0 = Debug|Any CPU
221-
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.ActiveCfg = Release|AnyCPU
222-
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.Build.0 = Release|AnyCPU
234+
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.ActiveCfg = Release|Any CPU
235+
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.Build.0 = Release|Any CPU
223236
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.XAIntegrationDebug|Any CPU.ActiveCfg = Debug|Any CPU
224237
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
225238
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.XAIntegrationRelease|Any CPU.ActiveCfg = Debug|Any CPU
@@ -366,8 +379,8 @@ Global
366379
{5EB9E888-E357-417E-9F39-DDEC195CE47F}.XAIntegrationRelease|AnyCPU.Build.0 = Debug|Any CPU
367380
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
368381
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Debug|AnyCPU.Build.0 = Debug|Any CPU
369-
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.ActiveCfg = Debug|Any CPU
370-
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.Build.0 = Debug|Any CPU
382+
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.ActiveCfg = Release|Any CPU
383+
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.Build.0 = Release|Any CPU
371384
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.XAIntegrationDebug|Any CPU.ActiveCfg = Debug|Any CPU
372385
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
373386
{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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<Objdump>$(AndroidMxeFullPath)\bin\x86_64-w64-mingw32.static-objdump</Objdump>
117117
<RanLib>$(AndroidMxeFullPath)\bin\x86_64-w64-mingw32.static-ranlib</RanLib>
118118
<Strip>$(AndroidMxeFullPath)\bin\x86_64-w64-mingw32.static-strip</Strip>
119-
<ConfigureFlags>PATH="$PATH:$(AndroidMxeFullPath)\bin" --host=x86_64-w64-mingw32.static --target=x86_64-w64-mingw32.static --disable-boehm --enable-mcs-build=no --enable-nls=no --enable-maintainer-mode --with-monodroid --disable-llvm</ConfigureFlags>
119+
<ConfigureFlags>PATH="$PATH:$(AndroidMxeFullPath)\bin" --host=x86_64-w64-mingw32.static --target=x86_64-w64-mingw32.static --disable-boehm --enable-mcs-build=no --enable-nls=no --enable-maintainer-mode --with-monodroid --disable-llvm ac_cv_header_zlib_h=no</ConfigureFlags>
120120
<NativeLibraryExtension>dll</NativeLibraryExtension>
121121
<OutputRuntimeFilename>libmonosgen-2.0</OutputRuntimeFilename>
122122
<OutputProfilerFilename></OutputProfilerFilename>
@@ -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>
@@ -68,24 +69,24 @@
6869
<Target Name="_SetAutogenShTimeToLastCommitTimestamp">
6970
<Exec
7071
Command="touch -m -t `git log -1 --format=%25cd --date=format-local:%25Y%25m%25d%25H%25M.%25S` autogen.sh"
71-
WorkingDirectory="$(_MonoPath)"
72+
WorkingDirectory="$(MonoSourceFullPath)"
7273
/>
7374
</Target>
7475
<Target Name="_Autogen"
7576
DependsOnTargets="_SetAutogenShTimeToLastCommitTimestamp"
76-
Inputs="$(_MonoPath)\autogen.sh"
77-
Outputs="$(_MonoPath)\configure">
77+
Inputs="$(MonoSourceFullPath)\autogen.sh"
78+
Outputs="$(MonoSourceFullPath)\configure">
7879
<Exec
7980
Command="NOCONFIGURE=1 ./autogen.sh"
80-
WorkingDirectory="$(_MonoPath)"
81+
WorkingDirectory="$(MonoSourceFullPath)"
8182
/>
8283
</Target>
8384
<Target Name="_ConfigureRuntimes"
84-
Inputs="$(_MonoPath)\configure"
85+
Inputs="$(MonoSourceFullPath)\configure"
8586
Outputs="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\Makefile')">
8687
<MakeDir Directories="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')" />
8788
<Exec
88-
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)"
89+
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)"
8990
WorkingDirectory="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')"
9091
/>
9192
<Touch
@@ -137,7 +138,7 @@
137138
/>
138139
<Exec
139140
Condition=" '$(Configuration)' != 'Debug' "
140-
Command="&quot;%(_MonoRuntime.Strip)&quot; &quot;$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntimeFilename).%(NativeLibraryExtension)&quot;"
141+
Command="&quot;%(_MonoRuntime.Strip)&quot; %(_MonoRuntime.StripFlags) &quot;$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntimeFilename).%(NativeLibraryExtension)&quot;"
141142
/>
142143
<Touch
143144
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)