Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
88207fd
JetBrains OpenJDK 11
grendello Apr 15, 2020
57530e0
Bump dependencies!
jonpryor Apr 16, 2020
3e6af18
OpenJDK11 support!
jonpryor Apr 16, 2020
e6d7542
[r8, manifestmerger] Target JDK 1.8
jonpryor Apr 20, 2020
6601fbc
[java-runtime] Use r8.jar instead of dx
jonpryor Apr 20, 2020
b78eed0
[manfestmerger] r8 must be built first
jonpryor Apr 20, 2020
3828571
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor May 4, 2020
a17f1c6
Fix build break when compiling xaprepare
jonpryor May 4, 2020
ebf3559
[java-runtime] Add ProjectReference for r8.csproj
jonpryor May 4, 2020
01be151
[java-runtimes] Fixity Fix
jonpryor May 4, 2020
ec9eca0
[scripts] Use r8.jar instead of dx
jonpryor May 5, 2020
bc7da93
Oops, forgot this s/dx/r8.jar/ replacement
jonpryor May 5, 2020
9b02c35
Let's try this again.
jonpryor May 5, 2020
0fca1ef
Trailing \ is bad
jonpryor May 5, 2020
f1af33e
[build] set $JAVA_HOME for mac test phases
jonathanpeppers May 6, 2020
181e4f5
Merge branch 'master' of https://github.com/xamarin/xamarin-android i…
jonathanpeppers May 6, 2020
1b6acb6
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor May 7, 2020
c2a95e2
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor May 8, 2020
85093ff
Use commandlinetools' avdmanager
jonpryor May 8, 2020
79a417a
Bump to xamarin/monodroid/jonp-try-xa-xat-ref@beb7c8fc
jonpryor May 9, 2020
1773d1b
Set JavacSourceVersion, JavacTargetVersion
jonpryor May 10, 2020
4eb11e8
[build] move Microsoft OpenJDK on Windows
jonathanpeppers May 11, 2020
527ac29
Remove `sdkmanager emulator` invocation
jonpryor May 13, 2020
6bf1bef
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor May 13, 2020
cea6614
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor May 14, 2020
d47bd6b
Fix <CreateMultiDexMainDexClassList/>?
jonpryor May 15, 2020
01901fe
Set `$(LatestSupportedJavaVersion)`=11.0.4
jonpryor May 15, 2020
6a7dfa3
Fix `make all-tests`
jonpryor May 15, 2020
70695d9
Fix Xamarin.Android.Build.Tests.BuildTest.GetDependencyWhenSDKIsMissi…
jonpryor May 15, 2020
fa8ac9e
Use cmdline-tools lint
jonpryor May 15, 2020
ed3e037
Add .idsig files to @(FileWrites)
jonathanpeppers May 15, 2020
5d62091
[tests] set /p:JavaSdkDirectory for MSBuild tests
jonathanpeppers May 15, 2020
4671de1
Revert "[build] move Microsoft OpenJDK on Windows"
jonathanpeppers May 15, 2020
f4960e8
Set %JAVA_HOME% for Windows Build and Test
jonathanpeppers May 18, 2020
841a05e
[test] accept SHA-256 for KeyToolTests
jonathanpeppers May 18, 2020
c0351dc
Merge branch 'master' of https://github.com/xamarin/xamarin-android i…
jonathanpeppers May 19, 2020
101139c
[build] fix %JAVA_HOME% on Windows
jonathanpeppers May 19, 2020
026bcf7
Use $(AndroidFrameworkVersion) instead of $(AndroidUseLatestPlatformSdk)
jonathanpeppers May 19, 2020
e120f20
[REVERT ME] print out %JAVA_HOME% throughout the build
jonathanpeppers May 19, 2020
90286ca
[tests] fix incorrect paths to Configuration.props
jonathanpeppers May 20, 2020
167d7ee
[REVERT ME] print out more %JAVA_HOME%
jonathanpeppers May 20, 2020
b2edbc9
[REVERT ME] one more %JAVA_HOME%
jonathanpeppers May 20, 2020
323a268
[Xamarin.Android.Build.Tasks]
jonpryor May 21, 2020
cf29684
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor May 21, 2020
3588f6c
Revert "[REVERT ME] print out %JAVA_HOME%"
jonathanpeppers May 21, 2020
8f0d900
[tests] retrieve JavaSdkDirectory from Configuration.props
jonathanpeppers May 21, 2020
2e22e76
[Xamarin.Android.Build.Tasks] Disable Javadoc use on JDK11
jonpryor May 21, 2020
4a32036
[tests] DotNetCLI should set JavaSdkDirectory
jonathanpeppers May 21, 2020
fe50c6e
[tests] CommonSampleLibrary is not an XA project
jonathanpeppers May 21, 2020
112980f
Revert "[tests] CommonSampleLibrary is not an XA project"
jonathanpeppers May 27, 2020
47ee214
Merge remote-tracking branch 'upstream/master' into jetbrains-openjdk
jonathanpeppers Jun 1, 2020
dd0c885
[tests] CodeBehindTests explicitly set $(TFV)
jonathanpeppers Jun 1, 2020
3258733
[tests] windows appears to need $(AppendTargetFrameworkToIntermediate…
jonathanpeppers Jun 1, 2020
4aa1a84
Merge remote-tracking branch 'upstream/master' into jetbrains-openjdk
jonathanpeppers Jun 2, 2020
90414d3
Revert "Bump to Android SDK Build-tools 29.0.2 (#4749)"
jonathanpeppers Jun 2, 2020
e5467ed
Bump to xamarin/xamarin-android-tools/master@967c278b (#4754)
jonpryor Jun 2, 2020
ef023a2
[XA.Build.Tasks] ServiceAttribute.ForegroundServiceType is [Flags] (#…
jpobst Jun 3, 2020
a121597
[Xamarin.Android.Build.Tasks] Fix use of non-int minSdkVersion
jonpryor Jun 3, 2020
a2b827e
<ValidateJavaVersion/> should be able to parse -rc4 in build-tools ve…
jonathanpeppers Jun 3, 2020
e73bc3a
[Xamarin.Android.Build.Tasks] Support cmdline-tools
jonpryor Jun 3, 2020
5dd172e
[Xamarin.Android.Build.Tasks] Build-tools r30 requires JDK11
jonpryor Jun 3, 2020
755a452
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor Jun 4, 2020
d1a7224
Try setting JI_JAVA_HOME.
jonpryor Jun 4, 2020
ebfd349
Don't setup test env for macOS Designer tests?
jonpryor Jun 4, 2020
56f1983
[ci] Export JI_JAVA_HOME on test environments
jonpryor Jun 4, 2020
9a5f3d0
[ci] Run `setup-test-environment.yaml` on macOS+Designer
jonpryor Jun 4, 2020
b874aeb
[CI] Allow overriding of xa source dir for test env setup
pjcollins Jun 4, 2020
6e53dd4
Fix setup-test-environment whitespace
pjcollins Jun 4, 2020
e6b8346
Bump to xamarin/xamarin-android-tools/jonp-windows-jvm-paths
jonpryor Jun 4, 2020
fbca417
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor Jun 4, 2020
9b25904
JI_JAVA_HOME sanitization
jonpryor Jun 4, 2020
44feed1
[ci] Add missing xaSourceDir param to setup-test-environment.yaml
pjcollins Jun 4, 2020
2d07941
Fix merge from fbca4170e4665445070cab62deeb1b37a5364b5a
jonpryor Jun 4, 2020
668eadb
[ci] fix macOS test provisioning location
jonpryor Jun 4, 2020
9b9618c
Export JI_JAVA_HOME when running `make prepare` for Java.Interop
jonpryor Jun 4, 2020
908cf89
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor Jun 5, 2020
2f069fb
Update default JDK to OpenJDK11.
jonpryor Jun 6, 2020
6c0de39
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor Jun 6, 2020
b550783
Nuse `nuget restore -Verbosity detailed`
jonpryor Jun 6, 2020
9b11c79
Merge remote-tracking branch 'origin/master' into jetbrains-openjdk
jonpryor Jun 8, 2020
7debfbd
[ci] Fix Designer
jonpryor Jun 8, 2020
5841608
Add release notes
jonpryor Jun 8, 2020
56503a3
More macOS+Designer integration fixes.
jonpryor Jun 8, 2020
9167b81
Increase expected rebuild times.
jonpryor Jun 8, 2020
c898c9e
Fix Xamarin.Designer.Android binlog source location
jonpryor Jun 8, 2020
db4dbe5
Flushity Flush
jonpryor Jun 9, 2020
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 Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@
<MingwCommandPrefix32>i686-w64-mingw32</MingwCommandPrefix32>
<MingwCommandPrefix64>x86_64-w64-mingw32</MingwCommandPrefix64>
</PropertyGroup>
<PropertyGroup>
<JavacSourceVersion>1.8</JavacSourceVersion>
<JavacTargetVersion>1.8</JavacTargetVersion>
</PropertyGroup>
<PropertyGroup>
<AndroidMxeFullPath Condition=" '$(AndroidMxeInstallPrefix)' != '' ">$([System.IO.Path]::GetFullPath ('$(AndroidMxeInstallPrefix)'))</AndroidMxeFullPath>
<AndroidNdkFullPath>$([System.IO.Path]::GetFullPath ('$(AndroidNdkDirectory)'))</AndroidNdkFullPath>
Expand Down
6 changes: 1 addition & 5 deletions build-tools/scripts/Jar.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
<Target Name="_GetJavacVersions"
DependsOnTargets="AndroidPrepareForBuild">
<PropertyGroup>
<_JavacSourceVersion Condition="$(_JdkVersion.StartsWith ('9'))">1.8</_JavacSourceVersion>
<_JavacSourceVersion Condition=" '$(_JavacSourceVersion)' == '' ">1.5</_JavacSourceVersion>
<_JavacTargetVersion Condition="$(_JdkVersion.StartsWith ('9'))">1.8</_JavacTargetVersion>
<_JavacTargetVersion Condition=" '$(_JavacTargetVersion)' == '' ">1.6</_JavacTargetVersion>
<JarPath Condition=" '$(JarPath)' == '' ">$(JavaSdkDirectory)\bin\jar</JarPath>
<JavaCPath Condition=" '$(JavaCPath)' == '' ">$(JavaSdkDirectory)\bin\javac</JavaCPath>
</PropertyGroup>
Expand Down Expand Up @@ -35,7 +31,7 @@
<PropertyGroup>
<_Javac>"$(JavaCPath)"</_Javac>
<_Jar>"$(JarPath)"</_Jar>
<_Targets>-source $(_JavacSourceVersion) -target $(_JavacTargetVersion)</_Targets>
<_Targets>-source $(JavacSourceVersion) -target $(JavacTargetVersion)</_Targets>
<_DestDir>$(IntermediateOutputPath)__CreateTestJarFile-bin</_DestDir>
<_AndroidJar>-bootclasspath "$(AndroidSdkDirectory)\platforms\android-$(_AndroidApiLevelName)\android.jar"</_AndroidJar>
<_CP>-cp "$(_JavaInteropJarPath)"</_CP>
Expand Down
2 changes: 1 addition & 1 deletion build-tools/scripts/JavaCallableWrappers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Overwrite="True"
/>
<PropertyGroup>
<_Target>-source $(JavacSourceVersion) -target $(JavacSourceVersion)</_Target>
<_Target>-source $(JavacSourceVersion) -target $(JavacTargetVersion)</_Target>
<_D>-d "$(IntermediateOutputPath)jcw\bin"</_D>
<_AndroidJar>"$(AndroidToolchainDirectory)\sdk\platforms\android-$(AndroidPlatformId)\android.jar"</_AndroidJar>
<_MonoAndroidJar>$(OutputPath)mono.android.jar</_MonoAndroidJar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ namespace Xamarin.Android.Prepare
{
partial class Configurables
{
const string JetBrainsOpenJDKOperatingSystem = "linux-x64";

partial class Urls
{
public static readonly Uri Corretto = new Uri ($"{Corretto_BaseUri}{CorrettoUrlPathVersion}/amazon-corretto-{CorrettoDistVersion}-linux-x64.tar.gz");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Xamarin.Android.Prepare
{
partial class Configurables
{
const string JetBrainsOpenJDKOperatingSystem = "osx-x64";
partial class Urls
{
public static readonly Uri Corretto = new Uri ($"{Corretto_BaseUri}{CorrettoUrlPathVersion}/amazon-corretto-{CorrettoDistVersion}-macosx-x64.tar.gz");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace Xamarin.Android.Prepare
{
partial class Configurables
{
const string JetBrainsOpenJDKOperatingSystem = "windows-x64";

partial class Urls
{
public static Uri Corretto => GetWindowsCorrettoUrl ();
Expand Down
22 changes: 20 additions & 2 deletions build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,22 @@ namespace Xamarin.Android.Prepare
//
partial class Configurables
{
const string JetBrainsOpenJDKVersion = "11.0.4";
const string JetBrainsOpenJDKRelease = "546.1";
static readonly string JetBrainsOpenJDKDownloadVersion = JetBrainsOpenJDKVersion.Replace ('.', '_');

const string CorrettoDistVersion = "8.242.08.1";
const string CorrettoUrlPathVersion = CorrettoDistVersion;

static Context ctx => Context.Instance;

public static partial class Urls
{
// https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbrsdk-11_0_4-linux-x64-b546.1.tar.gz
// https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbrsdk-11_0_4-osx-x64-b546.1.tar.gz
// https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbrsdk-11_0_4-windows-x64-b546.1.tar.gz
public static readonly Uri JetBrainsOpenJDK = new Uri ($"https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbrsdk-{JetBrainsOpenJDKDownloadVersion}-{JetBrainsOpenJDKOperatingSystem}-b{JetBrainsOpenJDKRelease}.tar.gz");

// Keep the trailing slash here - OS-specific code assumes it's there.
public const string Corretto_BaseUri = "https://corretto.aws/downloads/resources/";

Expand All @@ -39,6 +48,9 @@ public static partial class Defaults
{
public static readonly char[] PropertyListSeparator = new [] { ':' };

public static readonly Version JetBrainsOpenJDKVersion = new Version (Configurables.JetBrainsOpenJDKVersion);
public static readonly Version JetBrainsOpenJDKRelease = new Version (Configurables.JetBrainsOpenJDKRelease);

// Mono runtimes
public const string DebugFileExtension = ".pdb";
public const string MonoHostMingwRuntimeNativeLibraryExtension = WindowsDLLSuffix;
Expand Down Expand Up @@ -104,9 +116,9 @@ public static partial class Defaults
public const int DefaultMaximumParallelTasks = 5;

/// <summary>
/// The maximum JDK version we support. Note: this will probably go away with Corretto
/// The maximum JDK version we support.
/// </summary>
public const int MaxJDKVersion = 8;
public static readonly Version MaxJDKVersion = new Version (11, 99, 0);

/// <summary>
/// Prefix for all the log files created by the bootstrapper.
Expand Down Expand Up @@ -318,6 +330,10 @@ public static partial class Paths
public static string CorrettoCacheDir => GetCachedPath (ref correttoCacheDir, () => ctx.Properties.GetRequiredValue (KnownProperties.AndroidToolchainCacheDirectory));
public static string CorrettoInstallDir => GetCachedPath (ref correttoInstallDir, () => Path.Combine (ctx.Properties.GetRequiredValue (KnownProperties.AndroidToolchainDirectory), "jdk"));

// JetBrains OpenJDK
public static string OpenJDKInstallDir => GetCachedPath (ref openJDKInstallDir, () => Path.Combine (ctx.Properties.GetRequiredValue (KnownProperties.AndroidToolchainDirectory), "jdk"));
public static string OpenJDKCacheDir => GetCachedPath (ref openJDKCacheDir, () => ctx.Properties.GetRequiredValue (KnownProperties.AndroidToolchainCacheDirectory));

// bundle
public static string BCLTestsArchiveName = "bcl-tests.zip";

Expand Down Expand Up @@ -403,6 +419,8 @@ static string GetCachedPath (ref string variable, Func<string> creator)
static string monoSdksTpnExternalPath;
static string monoSDKSIncludeDestDir;
static string monoLlvmTpnPath;
static string openJDKInstallDir;
static string openJDKCacheDir;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ namespace Xamarin.Android.Prepare
partial class Scenario_AndroidToolchain : ScenarioNoStandardEndSteps
{
public Scenario_AndroidToolchain ()
: base ("AndroidToolchain", "Install Android SDK, NDK and Corretto JDK.", Context.Instance)
: base ("AndroidToolchain", "Install Android SDK, NDK and OpenJDK.", Context.Instance)
{}

protected override void AddSteps (Context context)
{
Steps.Add (new Step_InstallCorrettoOpenJDK ());
Steps.Add (new Step_InstallJetBrainsOpenJDK ());
Steps.Add (new Step_Android_SDK_NDK ());

// disable installation of missing programs...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override void AddSteps (Context context)
throw new ArgumentNullException (nameof (context));

Steps.Add (new Step_ShowEnabledRuntimes ());
Steps.Add (new Step_InstallCorrettoOpenJDK ());
Steps.Add (new Step_InstallJetBrainsOpenJDK ());
Steps.Add (new Step_Android_SDK_NDK ());
Steps.Add (new Step_GenerateFiles (atBuildStart: true));
Steps.Add (new Step_PrepareProps ());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Threading.Tasks;

namespace Xamarin.Android.Prepare
{
partial class Step_InstallJetBrainsOpenJDK
{
void MoveContents (string sourceDir, string destinationDir)
{
Utilities.MoveDirectoryContentsRecursively (sourceDir, destinationDir);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.IO;

namespace Xamarin.Android.Prepare
{
partial class Step_InstallJetBrainsOpenJDK
{
void MoveContents (string sourceDir, string destinationDir)
{
string realSourceDir = Path.Combine (sourceDir, "Contents", "Home");
Utilities.MoveDirectoryContentsRecursively (realSourceDir, destinationDir);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Threading.Tasks;

namespace Xamarin.Android.Prepare
{
partial class Step_InstallJetBrainsOpenJDK
{
async Task<bool> Unpack (string fullArchivePath, string destinationDirectory, bool cleanDestinationBeforeUnpacking = false)
{
return await Utilities.Unpack (fullArchivePath, destinationDirectory, cleanDestinatioBeforeUnpacking: true);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using System;
using System.IO;
using System.Threading.Tasks;

namespace Xamarin.Android.Prepare
{
partial class Step_InstallJetBrainsOpenJDK
{
async Task<bool> Unpack (string fullArchivePath, string destinationDirectory, bool cleanDestinationBeforeUnpacking = false)
{
// On Windows we don't have Tar available and the Windows package is a .tar.gz
// 7zip can unpack tar.gz but it's a two-stage process - first it decompresses the package, then it can be
// invoked again to extract the actual tar contents.

if (cleanDestinationBeforeUnpacking)
Utilities.DeleteDirectorySilent (destinationDirectory);
Utilities.CreateDirectory (destinationDirectory);

var sevenZip = new SevenZipRunner (Context.Instance);
Log.DebugLine ($"Uncompressing {fullArchivePath} to {destinationDirectory}");
if (!await sevenZip.Extract (fullArchivePath, destinationDirectory)) {
Log.DebugLine ($"Failed to decompress {fullArchivePath}");
return false;
}

string tarPath = Path.Combine (destinationDirectory, Path.GetFileNameWithoutExtension (fullArchivePath));
bool ret = await sevenZip.Extract (tarPath, destinationDirectory);
Utilities.DeleteFileSilent (tarPath);

if (!ret) {
Log.DebugLine ($"Failed to extract TAR contents from {tarPath}");
return false;
}

return true;
}

void MoveContents (string sourceDir, string destinationDir)
{
Utilities.MoveDirectoryContentsRecursively (sourceDir, destinationDir);
}
}
}
Loading