]
},
"microsoft.dotnet.xharness.cli": {
- "version": "1.0.0-prerelease.20264.9",
+ "version": "1.0.0-prerelease.20265.8",
"commands": [
"xharness"
]
[Theory]
[MemberData(nameof(GetInterfaceMap_TestData))]
+ // Android-only, change to TestPlatforms.Android once arcade dependency is updated
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/36653", TestRuntimes.Mono)]
public void GetInterfaceMap(Type interfaceType, Type classType, Tuple<MethodInfo, MethodInfo>[] expectedMap)
{
InterfaceMapping actualMapping = classType.GetInterfaceMap(interfaceType);
../../../../.././build.sh Mono+Libs -os Android -arch $(MONO_ARCH) -c $(MONO_CONFIG)
apk: clean appbuilder
- $(DOTNET) publish -c Release -r android-$(MONO_ARCH) \
+ $(DOTNET) publish -c $(MONO_CONFIG) -r android-$(MONO_ARCH) \
/p:Platform=$(MONO_ARCH) /p:DeployAndRun=true
clean:
<Message Importance="High" Text="Apk: $(ApkBundlePath)"/>
<Message Importance="High" Text="PackageId: $(ApkPackageId)"/>
+ <Exec Condition="'$(DeployAndRun)' == 'true'" Command="$(AdbTool) kill-server"/>
+ <Exec Condition="'$(DeployAndRun)' == 'true'" Command="$(AdbTool) start-server"/>
+ <Exec Condition="'$(DeployAndRun)' == 'true'" Command="$(AdbTool) logcat -c" />
<Message Condition="'$(DeployAndRun)' == 'true'" Importance="High" Text="Uninstalling app if it exists (throws an error if it doesn't but it can be ignored):"/>
<Exec Condition="'$(DeployAndRun)' == 'true'" Command="$(AdbTool) uninstall net.dot.HelloAndroid" ContinueOnError="WarnAndContinue" />
<Exec Condition="'$(DeployAndRun)' == 'true'" Command="$(AdbTool) install $(ApkDir)/bin/HelloAndroid.apk" />
<Exec Condition="'$(DeployAndRun)' == 'true'" Command="$(AdbTool) shell am instrument -w net.dot.HelloAndroid/net.dot.MonoRunner" />
+ <Exec Condition="'$(DeployAndRun)' == 'true'" Command="$(AdbTool) logcat -d -s DOTNET" />
</Target>
</Project>
File.WriteAllText(Path.Combine(OutputDir, "CMakeLists.txt"), cmakeLists);
string runtimeAndroidSrc = Utils.GetEmbeddedResource("runtime-android.c")
- .Replace("%EntryPointLibName%", Path.GetFileName(entryPointLib));
+ .Replace("%EntryPointLibName%", Path.GetFileName(entryPointLib)
+ .Replace("%RID%", GetRid(abi)));
File.WriteAllText(Path.Combine(OutputDir, "runtime-android.c"), runtimeAndroidSrc);
string cmakeGenArgs = $"-DCMAKE_TOOLCHAIN_FILE={androidToolchain} -DANDROID_ABI=\"{abi}\" -DANDROID_STL=none " +
return (alignedApk, packageId);
}
+
+ private static string GetRid(string abi) => abi switch
+ {
+ "arm64-v8a" => "android-arm64",
+ "armeabi-v7a" => "android-arm",
+ "x86_64" => "android-x64",
+ _ => "android-" + abi
+ };
/// <summary>
/// Scan android SDK for build tools (ignore preview versions)
chdir (bundle_path);
// TODO: set TRUSTED_PLATFORM_ASSEMBLIES, APP_PATHS and NATIVE_DLL_SEARCH_DIRECTORIES
- monovm_initialize(0, NULL, NULL);
+
+ const char* appctx_keys[2];
+ appctx_keys[0] = "RUNTIME_IDENTIFIER";
+ appctx_keys[1] = "APP_CONTEXT_BASE_DIRECTORY";
+
+ const char* appctx_values[2];
+ appctx_values[0] = "%RID%";
+ appctx_values[1] = bundle_path;
+
+ monovm_initialize(2, appctx_keys, appctx_values);
mono_debug_init (MONO_DEBUG_FORMAT_MONO);
mono_install_assembly_preload_hook (assembly_preload_hook, NULL);