Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Compatibility-v13] Add binding for android-support-v13.jar.

  • Loading branch information...
commit 1c922f78cc54269c8deb290059a54a7b2f9c3c5e 1 parent be32f65
@jonpryor jonpryor authored
View
2  Compatibility-v13/bindings/.gitignore
@@ -0,0 +1,2 @@
+bin
+obj
View
58 Compatibility-v13/bindings/Makefile
@@ -0,0 +1,58 @@
+MONO_ANDROID_PATH := /Developer/MonoAndroid/usr
+API_LEVELS := 14
+BUILDDIR := bin
+TOP := ../..
+thisdir := Compatibility-v13/binding
+
+-include ../../env.config
+
+MCW_GEN := $(MONO_ANDROID_PATH)/bin/mcw-gen
+
+platforms_dir := $(BUILDDIR)/platforms
+
+ASSEMBLIES = $(API_LEVELS:%=$(platforms_dir)/android-%/Mono.Android.Compatibility.v13.dll)
+DOCS = $(API_LEVELS:%=$(platforms_dir)/android-%/Mono.Android.Compatibility.v13.xml)
+JAR = android-support-v13.jar
+
+VPATH = $(ANDROID_SDK_PATH)/extras/android/support/v13/ $(ANDROID_SDK_PATH)/extras/android/compatibility/v13/
+
+all:: $(JARS) $(ASSEMBLIES) $(DOCS)
+
+clean::
+ $(RM) -r $(ASSEMBLIES) obj
+
+SOURCES = \
+ $(TOP)/src/Android.Support.V4.Content/CursorLoader.cs \
+ src/AssemblyInfo.cs
+
+$(ASSEMBLIES): $(platforms_dir)/android-%/Mono.Android.Compatibility.v13.dll: $(JAR) map.csv methodmap.csv metadata $(SOURCES) $(MCW_GEN)
+ -mkdir -p $(platforms_dir)/android-$*
+ -mkdir -p obj/platform-$*
+ $(MCW_GEN) \
+ -sdk-dir="$(ANDROID_SDK_PATH)" \
+ -sdk-platform=$* \
+ -jar=$< \
+ -dll="$(platforms_dir)/android-$*/Mono.Android.Compatibility.v13.dll" \
+ -use-variable-csv-format \
+ -fixup=metadata \
+ -enumfields=map.csv -enummethods=methodmap.csv -global -v \
+ -o obj/platform-$* \
+ -cscopt -debug+ -cscopt -nowarn:0109,0108 \
+ -droiddoc=developer.android.com/reference \
+ $(SOURCES:%=-cscopt "%")
+
+$(DOCS): $(platforms_dir)/android-%/Mono.Android.Compatibility.v13.xml: $(platforms_dir)/android-%/Mono.Android.Compatibility.v13.dll map.csv metadata
+ $(RM) -R obj/platform-$*/docs
+ -mkdir -p obj/platform-$*/docs
+ -cp -R Documentation/en obj/platform-$*/docs
+ mdoc update -o obj/platform-$*/docs $< -L $(MONO_ANDROID_PATH)/lib/mandroid/platforms/android-$*
+ mdoc export-msxdoc -o $@ obj/platform-$*/docs
+
+$(MCW_GEN):
+ @echo "Building bindings requires Mono for Android 4.2 or later."
+ exit 1
+
+$(JAR):
+ @echo "Please install \"Extras > Android Support package\" within the \`android\` utility to build Compatibility-v13."
+ @exit 1
+
View
3  Compatibility-v13/bindings/map.csv
@@ -0,0 +1,3 @@
+0, Android\Support\V4\App\FragmentTagType, Id, android/support/v4/app/FragmentActivity$FragmentTag.Fragment_id, 1
+0, Android\Support\V4\App\FragmentTagType, Name, android/support/v4/app/FragmentActivity$FragmentTag.Fragment_name, 0
+0, Android\Support\V4\App\FragmentTagType, Tag, android/support/v4/app/FragmentActivity$FragmentTag.Fragment_tag, 2
View
18 Compatibility-v13/bindings/metadata
@@ -0,0 +1,18 @@
+<metadata>
+ <remove-node path="/api/package[@name='android.support.v4.widget']/class[@name='CursorAdapter']/implements[@name='android.support.v4.widget.CursorFilter.CursorFilterClient']" />
+ <remove-node path="/api/package[@name='android.support.v4.widget']/class[@name='CursorAdapter']/field[@name='mCursorFilter']" />
+
+ <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" />
+ <!-- FIXME:
+ This method is an override of another method in the base types.
+ The base method expects JLO, but this method returns Cursor.
+ So we somehow have to fill the gap between them.
+ -->
+ <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" />
+
+ <remove-node path="/api/package[@name='android.support.v4.view.accessibility']/class[@name='AccessibilityNodeInfoCompat.AccessibilityNodeInfoIcsImpl']" />
+ <remove-node path="/api/package[@name='android.support.v4.widget']/class[@name='CursorAdapter']" />
+ <remove-node path="/api/package[@name='android.support.v4.widget']/class[@name='CursorAdapter.ChangeObserver']" />
+ <remove-node path="/api/package[@name='android.support.v4.view.accessibility']/class[@name='AccessibilityNodeInfoCompat.AccessibilityNodeInfoStubImpl']" />
+ <remove-node path="/api/package[@name='android.support.v4.view']/interface[@name='ViewPager.OnAdapterChangeListener']" />
+</metadata>
View
4 Compatibility-v13/bindings/methodmap.csv
@@ -0,0 +1,4 @@
+0,android.support.v4.app,BackStackState,writeToParcel,p1, Android.OS.ParcelableWriteFlags
+0,android.support.v4.app,FragmentState,writeToParcel,p1, Android.OS.ParcelableWriteFlags
+0,android.support.v4.app,FragmentManagerState,writeToParcel,p1, Android.OS.ParcelableWriteFlags
+0,android.support.v4.app,Fragment.SavedState,writeToParcel,p1, Android.OS.ParcelableWriteFlags
View
1  Compatibility-v13/bindings/src/AssemblyInfo.cs
@@ -0,0 +1 @@
+
Please sign in to comment.
Something went wrong with that request. Please try again.