Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit f268f4b

Browse files
authored
Merge pull request #160 from xamarin/android-5.11
Update Android bindings
2 parents 2784d33 + 24b7f3f commit f268f4b

File tree

31 files changed

+144
-12047
lines changed

31 files changed

+144
-12047
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ externals
99
.vs/
1010
tmp-nugets/
1111
_._
12+
**/Resource.designer.cs

Facebook.Android/build.cake

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ var BUILD_TIMESTAMP = DateTime.UtcNow.ToString();
99
var TARGET = Argument ("t", Argument ("target", "ci"));
1010

1111
var ARTIFACTS = new List<ArtifactInfo> {
12-
new ArtifactInfo("facebook-android-sdk", "5.0.3"),
13-
new ArtifactInfo("facebook-core", "5.0.3"),
14-
new ArtifactInfo("facebook-common", "5.0.3"),
15-
new ArtifactInfo("facebook-login", "5.0.3"),
16-
new ArtifactInfo("facebook-share", "5.0.3"),
17-
new ArtifactInfo("facebook-places", "5.0.3"),
18-
new ArtifactInfo("facebook-applinks", "5.0.3"),
19-
new ArtifactInfo("facebook-messenger", "5.0.3"),
12+
new ArtifactInfo("facebook-android-sdk", "5.11.0"),
13+
new ArtifactInfo("facebook-core", "5.11.0"),
14+
new ArtifactInfo("facebook-common", "5.11.0"),
15+
new ArtifactInfo("facebook-login", "5.11.0"),
16+
new ArtifactInfo("facebook-share", "5.11.0"),
17+
new ArtifactInfo("facebook-places", "5.11.0"),
18+
new ArtifactInfo("facebook-applinks", "5.11.0"),
19+
new ArtifactInfo("facebook-messenger", "5.11.0"),
2020
new ArtifactInfo("facebook-livestreaming", "4.36.0"),
2121
new ArtifactInfo("facebook-loginkit", "4.36.0"),
22-
new ArtifactInfo("facebook-marketing", "5.0.3"),
22+
new ArtifactInfo("facebook-marketing", "5.9.0"),
2323
// This needs to stay preview until google play services comes out of preview
24-
new ArtifactInfo("account-kit-sdk", "5.0.0", "5.0.0-preview"),
25-
new ArtifactInfo("audience-network-sdk", "5.4.0"),
24+
new ArtifactInfo("account-kit-sdk", "5.4.0"),
25+
new ArtifactInfo("audience-network-sdk", "5.6.0"),
2626
new ArtifactInfo("notifications", "1.0.2")
2727
};
2828

@@ -41,20 +41,27 @@ class ArtifactInfo
4141
}
4242

4343
Task ("externals")
44-
.WithCriteria (!FileExists ("./externals/facebook-android-sdk.aar"))
4544
.Does (() =>
4645
{
4746
EnsureDirectoryExists ("./externals/");
4847

4948
foreach (var artifact in ARTIFACTS) {
5049
var url = $"http://search.maven.org/remotecontent?filepath=com/facebook/android/{artifact.ArtifactId}/{artifact.Version}/{artifact.ArtifactId}-{artifact.Version}.aar";
50+
var pomUrl = $"http://search.maven.org/remotecontent?filepath=com/facebook/android/{artifact.ArtifactId}/{artifact.Version}/{artifact.ArtifactId}-{artifact.Version}.pom";
5151
var docUrl = $"http://search.maven.org/remotecontent?filepath=com/facebook/android/{artifact.ArtifactId}/{artifact.Version}/{artifact.ArtifactId}-{artifact.Version}-javadoc.jar";
5252

53-
DownloadFile(url, $"./externals/{artifact.ArtifactId}.aar");
53+
var aar = $"./externals/{artifact.ArtifactId}.aar";
54+
if (!FileExists (aar))
55+
DownloadFile(url, aar);
56+
57+
var pom = $"./externals/{artifact.ArtifactId}.pom";
58+
if (!FileExists (pom))
59+
DownloadFile(pomUrl, pom);
5460

5561
try {
5662
var localDocsFile = $"./externals/{artifact.ArtifactId}-javadoc.jar";
57-
DownloadFile(docUrl, localDocsFile);
63+
if (!FileExists (localDocsFile))
64+
DownloadFile(docUrl, localDocsFile);
5865

5966
EnsureDirectoryExists ($"./externals/{artifact.ArtifactId}-docs/");
6067
Unzip (localDocsFile, $"./externals/{artifact.ArtifactId}-docs/");
@@ -106,8 +113,9 @@ Task ("nuget")
106113

107114
MSBuild(csproj, c =>
108115
c.SetConfiguration("Release")
116+
.WithProperty("NoBuild", "true")
109117
.WithProperty("PackageVersion", art.Version)
110-
.WithProperty("PackageOutputPath", "../../output/")
118+
.WithProperty("PackageOutputPath", MakeAbsolute((DirectoryPath)"./output/").FullPath)
111119
.WithProperty("DesignTimeBuild", "false")
112120
.WithTarget("Pack"));
113121
}

Facebook.Android/samples/HelloFacebookSample/HelloFacebookSample.csproj

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
<AndroidResgenClass>Resource</AndroidResgenClass>
1515
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
1616
<AndroidApplication>True</AndroidApplication>
17-
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
1817
<AssemblyName>HelloFacebookSample</AssemblyName>
19-
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
18+
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
2019
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
2120
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a;x86_64</AndroidSupportedAbis>
2221
</PropertyGroup>
@@ -30,6 +29,7 @@
3029
<WarningLevel>4</WarningLevel>
3130
<AndroidLinkMode>None</AndroidLinkMode>
3231
<ConsolePause>false</ConsolePause>
32+
<AndroidDexTool>d8</AndroidDexTool>
3333
</PropertyGroup>
3434
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3535
<DebugType>full</DebugType>
@@ -39,6 +39,7 @@
3939
<WarningLevel>4</WarningLevel>
4040
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
4141
<ConsolePause>false</ConsolePause>
42+
<AndroidDexTool>d8</AndroidDexTool>
4243
</PropertyGroup>
4344
<ItemGroup>
4445
<Reference Include="System" />
@@ -106,15 +107,12 @@
106107
</ItemGroup>
107108

108109
<ItemGroup>
109-
<PackageReference Include="Xamarin.Android.Support.Annotations" Version="27.0.2" />
110-
<PackageReference Include="Xamarin.Android.Support.v4" Version="27.0.2" />
111-
<PackageReference Include="Xamarin.Android.Support.v7.RecyclerView" Version="27.0.2" />
112-
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="27.0.2" />
110+
<PackageReference Include="Xamarin.Android.Support.Annotations" Version="28.0.0.3" />
111+
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.3" />
112+
<PackageReference Include="Xamarin.Android.Support.v7.RecyclerView" Version="28.0.0.3" />
113+
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.3" />
113114

114-
<PackageReference Include="Xamarin.GooglePlayServices.Ads" Version="60.1142.1" />
115-
116-
<PackageReference Include="Xam.Plugins.Android.ExoPlayer.Core" Version="2.7.3" />
117-
<PackageReference Include="Xam.Plugins.Android.ExoPlayer.Dash" Version="2.7.3" />
115+
<PackageReference Include="Xamarin.GooglePlayServices.Ads" Version="71.1720.1" />
118116
</ItemGroup>
119117

120118
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />

Facebook.Android/samples/HelloFacebookSample/Properties/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.facebook.samples.hellofacebook" android:versionCode="1" android:versionName="1.0">
3-
<uses-sdk android:minSdkVersion="14" />
3+
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="29" />
44
<application android:label="@string/app_name" android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar">
55
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/app_name" />
66
<provider android:authorities="com.facebook.app.FacebookContentProvider355198514515820" android:name="com.facebook.FacebookContentProvider" android:exported="true" />

0 commit comments

Comments
 (0)