Skip to content

Instantly share code, notes, and snippets.

@jonpryor
Created May 24, 2016 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonpryor/2442b429ba39eb0dc11b7378f5c6f868 to your computer and use it in GitHub Desktop.
Save jonpryor/2442b429ba39eb0dc11b7378f5c6f868 to your computer and use it in GitHub Desktop.
diff --git a/Makefile b/Makefile
index 1c51739..aa34c01 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,12 @@ CONFIGURATION = Debug
MSBUILD = xbuild /p:Configuration=$(CONFIGURATION) $(MSBUILD_ARGS)
RUNTIME := $(shell if [ -f `which mono64` ] ; then echo mono64 ; else echo mono; fi) --debug=casts
+LIB_MANDROID_PROJECTS = \
+ external/Java.Interop/tools/class-parse/class-parse.csproj \
+ external/Java.Interop/tools/generator/generator.csproj \
+ external/Java.Interop/tools/logcat-parse/logcat-parse.csproj
+
+
NUNIT_TESTS = \
bin/Test$(CONFIGURATION)/Xamarin.Android.Build.Tests.dll
@@ -19,6 +25,7 @@ endif
all:
$(MSBUILD)
+ $(foreach p,$(LIB_MANDROID_PROJECTS), $(MSBUILD) $(p) /p:OutputPath=`pwd`/bin/$(CONFIGURATION)/lib/mandroid ;)
prepare:
git submodule update --init --recursive
diff --git a/external/Java.Interop b/external/Java.Interop
--- a/external/Java.Interop
+++ b/external/Java.Interop
@@ -1 +1 @@
-Subproject commit a9312d2607c87a301e05db7fe2243200d2557666
+Subproject commit a9312d2607c87a301e05db7fe2243200d2557666-dirty
@jonpryor
Copy link
Author

On further consideration, we feel that the better fix here is threefold:

  1. Update the Java.Interop repo to follow xamarin-android in "style" and use a Configuration.props+Configuration.Override.props pair, and update the required projects such as class-parse.csproj to Import these files.
  2. Update make prepare to generate an external/Java.Interop/Configuration.Override.props file. (1) and (2) would allow xamarin-android to override the default $(OutputPath) of e.g. class-parse.csproj to be xamarin-android/bin/$(Configuration)/lib/mandroid, instead of xamarin-android/external/Java.Interop/bin/Debug.
  3. Add the required projects to Xamarin.Android.sln.

This will allow the projects to be built "normally" within the scope of Xamarin.Android.sln and place their outputs into the correct directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment