[Firebase][Core] Updated to version 6.1.0 (Firebase v6.5.0)

* Moved Podfile structure to common.cake
* Added ability to add custom code to Podfiles
* Added sample of how to use the custom_externals_download.cake file
This commit is contained in:
SotoiGhost 2019-07-31 01:58:03 -05:00
Родитель 9a452a4490
Коммит cc70d18b36
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 72EA2B8D62E38FAB
7 изменённых файлов: 79 добавлений и 41 удалений

Просмотреть файл

@ -20,17 +20,6 @@ var ARTIFACTS_TO_BUILD = new List<Artifact> ();
var SOURCES_TARGETS = new List<string> ();
var SAMPLES_TARGETS = new List<string> ();
// Podfile basic structure
var PODFILE_BEGIN = new [] {
"platform :ios, '{0}'",
"install! 'cocoapods', :integrate_targets => false",
"use_frameworks!",
"target 'XamarinGoogle' do",
};
var PODFILE_END = new [] {
"end",
};
FilePath GetCakeToolPath ()
{
var possibleExe = GetFiles ("./**/tools/Cake/Cake.exe").FirstOrDefault ();
@ -79,6 +68,7 @@ Task("prepare-artifacts")
{
SetArtifactsDependencies ();
SetArtifactsPodSpecs ();
SetArtifactsExtraPodfileLines ();
SetArtifactsSamples ();
var orderedArtifactsForBuild = new List<Artifact> ();
@ -144,6 +134,8 @@ Task ("externals")
// Call here custom methods created at custom_externals_download.cake file
// to download frameworks and/or bundles for the artifact
// if (ARTIFACTS_TO_BUILD.Contains (FIREBASE_CORE_ARTIFACT))
// FirebaseCoreDownload ();
});
Task ("libs")

Просмотреть файл

@ -1,5 +1,18 @@
#load "poco.cake"
// Podfile basic structure
var PODFILE_BEGIN = new [] {
"platform :ios, '{0}'",
"install! 'cocoapods', :integrate_targets => false",
"use_frameworks!",
};
var PODFILE_TARGET = new [] {
"target 'XamarinGoogle' do",
};
var PODFILE_END = new [] {
"end",
};
void AddArtifactDependencies (List<Artifact> list, Artifact [] dependencies)
{
if (dependencies == null)
@ -30,6 +43,11 @@ void CreateAndInstallPodfile (Artifact artifact)
podfileBegin [0] = string.Format (podfileBegin [0], artifact.MinimunSupportedVersion);
podfile.AddRange (podfileBegin);
if (artifact.ExtraPodfileLines != null)
podfile.AddRange (artifact.ExtraPodfileLines);
podfile.AddRange (PODFILE_TARGET);
foreach (var podSpec in artifact.PodSpecs) {
if (podSpec.FrameworkSource != FrameworkSource.Pods)
continue;
@ -46,7 +64,7 @@ void CreateAndInstallPodfile (Artifact artifact)
podfile.Add ($"\tpod '{podSpec.Name}/{subSpec}', '{podSpec.Version}'");
}
if (podfile.Count == PODFILE_BEGIN.Length)
if (podfile.Count == PODFILE_BEGIN.Length + PODFILE_TARGET.Length)
return;
podfile.AddRange (PODFILE_END);

Просмотреть файл

@ -5,7 +5,7 @@ Artifact FIREBASE_ANALYTICS_ARTIFACT = new Artifact ("Firebase.Ana
Artifact FIREBASE_AUTH_ARTIFACT = new Artifact ("Firebase.Auth", "5.0.4.1", "8.0", ComponentGroup.Firebase, csprojName: "Auth");
Artifact FIREBASE_CLOUD_FIRESTORE_ARTIFACT = new Artifact ("Firebase.CloudFirestore", "0.13.3", "8.0", ComponentGroup.Firebase, csprojName: "CloudFirestore");
Artifact FIREBASE_CLOUD_MESSAGING_ARTIFACT = new Artifact ("Firebase.CloudMessaging", "3.1.2", "8.0", ComponentGroup.Firebase, csprojName: "CloudMessaging");
Artifact FIREBASE_CORE_ARTIFACT = new Artifact ("Firebase.Core", "5.2.0", "8.0", ComponentGroup.Firebase, csprojName: "Core");
Artifact FIREBASE_CORE_ARTIFACT = new Artifact ("Firebase.Core", "6.1.0", "8.0", ComponentGroup.Firebase, csprojName: "Core");
Artifact FIREBASE_CRASHLYTICS_ARTIFACT = new Artifact ("Firebase.Crashlytics", "3.10.9", "8.0", ComponentGroup.Firebase, csprojName: "Crashlytics");
Artifact FIREBASE_DATABASE_ARTIFACT = new Artifact ("Firebase.Database", "5.0.3", "8.0", ComponentGroup.Firebase, csprojName: "Database");
Artifact FIREBASE_DYNAMIC_LINKS_ARTIFACT = new Artifact ("Firebase.DynamicLinks", "3.0.2.1", "8.0", ComponentGroup.Firebase, csprojName: "DynamicLinks");
@ -124,9 +124,9 @@ void SetArtifactsPodSpecs ()
new PodSpec ("Firebase", "5.8.1", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseMessaging", targetName: "FirebaseMessaging", subSpecs: new [] { "Messaging" })
};
FIREBASE_CORE_ARTIFACT.PodSpecs = new [] {
new PodSpec ("Firebase", "5.16.0", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseCore", targetName: "FirebaseCore", subSpecs: new [] { "CoreOnly" }),
new PodSpec ("Firebase", "6.5.0", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseCore", targetName: "FirebaseCore", subSpecs: new [] { "CoreOnly" }),
new PodSpec ("FirebaseAuthInterop", "1.0.0", frameworkSource: FrameworkSource.Pods, canBeBuild: false),
new PodSpec ("GoogleUtilities", "5.3.7", frameworkSource: FrameworkSource.Pods, subSpecs: new [] { "AppDelegateSwizzler", "Environment", "ISASwizzler", "Logger", "MethodSwizzler", "Network", "NSData+zlib", "Reachability", "UserDefaults" }),
new PodSpec ("GoogleUtilities", "6.2.3", frameworkSource: FrameworkSource.Pods, subSpecs: new [] { "AppDelegateSwizzler", "Environment", "ISASwizzler", "Logger", "MethodSwizzler", "Network", "NSData+zlib", "Reachability", "UserDefaults" }),
new PodSpec ("GoogleToolboxForMac", "2.1.4", frameworkSource: FrameworkSource.Pods, subSpecs: new [] { "NSData+zlib", "NSDictionary+URLArguments", "Logger", "StringEncoding", "URLBuilder" }),
new PodSpec ("GoogleAPIClientForREST", "1.3.7", frameworkSource: FrameworkSource.Pods, subSpecs: new [] { "Vision" }, useDefaultSubspecs: true),
new PodSpec ("GTMSessionFetcher", "1.2.1", frameworkSource: FrameworkSource.Pods, subSpecs: new [] { "Full" }),
@ -206,6 +206,25 @@ void SetArtifactsPodSpecs ()
};
}
void SetArtifactsExtraPodfileLines ()
{
var staticFrameworkLines = new [] {
"=begin",
"This override the static_framework flag to false,",
"in order to be able to build dynamic frameworks.",
"=end",
"pre_install do |installer|",
"\tinstaller.pod_targets.each do |pod|",
"\t\tdef pod.static_framework?;",
"\t\t\tfalse",
"\t\tend",
"\tend",
"end",
};
FIREBASE_CORE_ARTIFACT.ExtraPodfileLines = staticFrameworkLines;
}
void SetArtifactsSamples ()
{
// Firebase components
@ -240,3 +259,4 @@ void SetArtifactsSamples ()
GOOGLE_SIGN_IN_ARTIFACT.Samples = new [] { "SignInExample" };
GOOGLE_TAG_MANAGER_ARTIFACT.Samples = new [] { "TagManagerSample" };
}

Просмотреть файл

@ -0,0 +1,4 @@
// void FirebaseCoreDownload ()
// {
// // Code to download the component frameworks into externals folder
// }

Просмотреть файл

@ -115,10 +115,12 @@ class Artifact : IEquatable<Artifact>
public int BuildOrder { get => Dependencies?.Length + 1 ?? 1; }
// The specs used in the Podfile.
public PodSpec [] PodSpecs { get; set; }
// Extra code to be added to Podfile
public string [] ExtraPodfileLines { get; set; }
// The samples created to test the component.
public string [] Samples { get; set; }
public Artifact (string id, string nugetVersion, string minimunSupportedVersion, ComponentGroup componentType, string csprojName = null, Artifact [] dependencies = null, PodSpec [] podSpecs = null, string [] samples = null)
public Artifact (string id, string nugetVersion, string minimunSupportedVersion, ComponentGroup componentType, string csprojName = null, Artifact [] dependencies = null, PodSpec [] podSpecs = null, string [] extraPodfileLines = null, string [] samples = null)
{
Id = id;
NugetVersion = nugetVersion;
@ -127,6 +129,7 @@ class Artifact : IEquatable<Artifact>
CsprojName = csprojName ?? id;
Dependencies = dependencies;
PodSpecs = podSpecs;
ExtraPodfileLines = extraPodfileLines;
Samples = samples;
}

Просмотреть файл

@ -7,28 +7,28 @@ using CoreGraphics;
namespace Firebase.Core
{
//@interface FIRAnalyticsConfiguration : NSObject
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "FIRAnalyticsConfiguration")]
interface AnalyticsConfiguration
{
// +(FIRAnalyticsConfiguration *)sharedInstance;
[Static]
[Export ("sharedInstance")]
AnalyticsConfiguration SharedInstance { get; }
////@interface FIRAnalyticsConfiguration : NSObject
//[DisableDefaultCtor]
//[BaseType (typeof (NSObject), Name = "FIRAnalyticsConfiguration")]
//interface AnalyticsConfiguration
//{
// // +(FIRAnalyticsConfiguration *)sharedInstance;
// [Static]
// [Export ("sharedInstance")]
// AnalyticsConfiguration SharedInstance { get; }
// -(void)setMinimumSessionInterval:(NSTimeInterval)minimumSessionInterval;
[Export ("setMinimumSessionInterval:")]
void SetMinimumSessionInterval (double minimumSessionInterval);
// // -(void)setMinimumSessionInterval:(NSTimeInterval)minimumSessionInterval;
// [Export ("setMinimumSessionInterval:")]
// void SetMinimumSessionInterval (double minimumSessionInterval);
// -(void)setSessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval;
[Export ("setSessionTimeoutInterval:")]
void SetSessionTimeoutInterval (double sessionTimeoutInterval);
// // -(void)setSessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval;
// [Export ("setSessionTimeoutInterval:")]
// void SetSessionTimeoutInterval (double sessionTimeoutInterval);
// -(void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled;
[Export ("setAnalyticsCollectionEnabled:")]
void SetAnalyticsCollectionEnabled (bool analyticsCollectionEnabled);
}
// // -(void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled;
// [Export ("setAnalyticsCollectionEnabled:")]
// void SetAnalyticsCollectionEnabled (bool analyticsCollectionEnabled);
//}
// typedef void (^FIRAppVoidBoolCallback)(BOOL);
delegate void AppVoidBoolHandler (bool success);
@ -97,10 +97,6 @@ namespace Firebase.Core
[Export ("sharedInstance")]
Configuration SharedInstance { get; }
// @property (readwrite, nonatomic) FIRAnalyticsConfiguration * analyticsConfiguration;
[Export ("analyticsConfiguration", ArgumentSemantic.Strong)]
AnalyticsConfiguration AnalyticsConfiguration { get; set; }
// - (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel;
[Export ("setLoggerLevel:")]
void SetLoggerLevel (LoggerLevel loggerLevel);
@ -170,6 +166,11 @@ namespace Firebase.Core
[Export ("storageBucket")]
string StorageBucket { get; set; }
// @property(nonatomic, copy, nullable) NSString *appGroupID;
[NullAllowed]
[Export ("appGroupID")]
string AppGroupId { get; set; }
// - (instancetype)initWithContentsOfFile:(NSString *)plistPath;
[Export ("initWithContentsOfFile:")]
IntPtr Constructor (string plistPath);

Просмотреть файл

@ -6,7 +6,7 @@
<RootNamespace>Firebase.Core</RootNamespace>
<AssemblyName>Firebase.Core</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>5.2.0</FileVersion>
<FileVersion>6.1.0</FileVersion>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
@ -23,7 +23,7 @@
<PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=2007321</PackageProjectUrl>
<PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=2007137</PackageLicenseUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageVersion>5.2.0</PackageVersion>
<PackageVersion>6.1.0</PackageVersion>
</PropertyGroup>
<ItemGroup>