Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

-keep class android.support.multidex.MultiDexApplication { <init>(); }
-keep class com.xamarin.java_interop.** { *; <init>(); }
-keep class mono.MonoRuntimeProvider { *; <init>(...); }
-keep class mono.MonoRuntimeProvider* { *; <init>(...); }
-keep class mono.MonoPackageManager { *; <init>(...); }
-keep class mono.MonoPackageManager_Resources { *; <init>(...); }
-keep class mono.android.** { *; <init>(...); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3607,6 +3607,19 @@ public void Desugar ([Values (true, false)] bool isRelease, [Values ("dx", "d8")
DexTool = dexTool,
LinkTool = linkTool,
};

//Add a BroadcastReceiver
proj.Sources.Add (new BuildItem.Source ("MyReceiver.cs") {
TextContent = () => @"
using Android.Content;

[BroadcastReceiver(Process = "":remote"", Name = ""foo.MyReceiver"")]
public class MyReceiver : BroadcastReceiver
{
public override void OnReceive(Context context, Intent intent) { }
}",
});

//Okhttp and Okio
//https://github.com/square/okhttp
//https://github.com/square/okio
Expand Down Expand Up @@ -3691,6 +3704,8 @@ public void foo()
var dexFile = builder.Output.GetIntermediaryPath (Path.Combine ("android", "bin", "classes.dex"));
FileAssert.Exists (dexFile);
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");
className = "Lmono/MonoRuntimeProvider_1;";
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");
}
}

Expand Down