Skip to content

Instantly share code, notes, and snippets.

View jonpryor's full-sized avatar

Jonathan Pryor jonpryor

View GitHub Profile
@jonpryor
jonpryor / Java.Interop.diff
Created February 15, 2024 21:17
Assemblies & build variations, oh my!
diff --git a/src/Java.Interop/Java.Interop.csproj b/src/Java.Interop/Java.Interop.csproj
index 43d5937e3..f93e38e6a 100644
--- a/src/Java.Interop/Java.Interop.csproj
+++ b/src/Java.Interop/Java.Interop.csproj
@@ -22,14 +22,15 @@
<Import Project="..\..\TargetFrameworkDependentValues.props" />
<PropertyGroup>
<DefineConstants>INTEROP;FEATURE_JNIOBJECTREFERENCE_INTPTRS;INTERNAL_NULLABLE_ATTRIBUTES;$(JavaInteropDefineConstants)</DefineConstants>
- <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\$(TargetFramework.ToLowerInvariant())\</IntermediateOutputPath>
- <OutputPath>$(ToolOutputFullPath)</OutputPath>
using System.Collections.Generic;
interface IFruit {
string Name {get;}
}
class Banana : IFruit {
public string Name => "Banana";
}
// Metadata version: v4.0.30319
.assembly extern System.Runtime
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 9:0:0:0
}
.assembly extern System.Console
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
// Metadata version: v4.0.30319
.assembly extern System.Runtime
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 9:0:0:0
}
.assembly extern System.Console
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
@jonpryor
jonpryor / exec-notify.sh
Last active August 7, 2025 20:24
macOS script which executes the command line, and when the command finishes posts a macOS notification that the command has finished, it's time(1) info, and the exit code.
#!/bin/sh -e
TIMEFILE=`mktemp -t exec-notify` || exit 1
EXIT_CODE=0
/usr/bin/time -o "${TIMEFILE}" "$@" || EXIT_CODE=$?
cat "${TIMEFILE}"
echo exit=$EXIT_CODE
diff --git a/Src/AwesomeAssertions/Equivalency/Steps/GenericEnumerableEquivalencyStep.cs b/Src/AwesomeAssertions/Equivalency/Steps/GenericEnumerableEquivalencyStep.cs
index 5622fb62..2c1edd81 100644
--- a/Src/AwesomeAssertions/Equivalency/Steps/GenericEnumerableEquivalencyStep.cs
+++ b/Src/AwesomeAssertions/Equivalency/Steps/GenericEnumerableEquivalencyStep.cs
@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
+using System.Text;
using AwesomeAssertions.Common;
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GetAndroidDefineConstants.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GetAndroidDefineConstants.cs
index 8699d0af0..f3bd8a40e 100644
--- a/src/Xamarin.Android.Build.Tasks/Tasks/GetAndroidDefineConstants.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tasks/GetAndroidDefineConstants.cs
@@ -15,7 +15,7 @@ namespace Xamarin.Android.Tasks
public override string TaskPrefix => "GAD";
[Required]
- public int AndroidApiLevel { get; set; }
+ public string AndroidApiLevel { get; set; } = "";