forked from firebase/flutterfire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cloud_functions] create no-op stubs for iOS/Android in cloud_functio…
…ns_web (firebase#1908) * create no-op stubs for iOS/Android in cloud_functions_web * Update CHANGELOG * Update version number to accomodate check. * Remove AndroidX from no-op plugin implementation
- Loading branch information
Showing
11 changed files
with
130 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: 659dc8129d4edb9166e9a0d600439d135740933f | ||
channel: beta | ||
|
||
project_type: plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 1.0.1 | ||
|
||
Add no-op plugin implementations for iOS and Android to enable builds. | ||
|
||
## 1.0.0 | ||
|
||
Initial release |
8 changes: 8 additions & 0 deletions
8
packages/cloud_functions/cloud_functions_web/android/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures |
43 changes: 43 additions & 0 deletions
43
packages/cloud_functions/cloud_functions_web/android/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
group 'io.flutter.plugins.cloud_functions_web' | ||
version '1.0' | ||
|
||
buildscript { | ||
ext.kotlin_version = '1.3.50' | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.5.0' | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
} | ||
} | ||
|
||
rootProject.allprojects { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
|
||
android { | ||
compileSdkVersion 28 | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
} | ||
defaultConfig { | ||
minSdkVersion 16 | ||
} | ||
lintOptions { | ||
disable 'InvalidPackage' | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/cloud_functions/cloud_functions_web/android/gradle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
android.enableR8=true |
5 changes: 5 additions & 0 deletions
5
...ages/cloud_functions/cloud_functions_web/android/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip |
1 change: 1 addition & 0 deletions
1
packages/cloud_functions/cloud_functions_web/android/settings.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rootProject.name = 'cloud_functions_web' |
3 changes: 3 additions & 0 deletions
3
packages/cloud_functions/cloud_functions_web/android/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="io.flutter.plugins.cloud_functions_web"> | ||
</manifest> |
30 changes: 30 additions & 0 deletions
30
...android/src/main/kotlin/io/flutter/plugins/cloud_functions_web/CloudFunctionsWebPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package io.flutter.plugins.cloud_functions_web | ||
|
||
import io.flutter.embedding.engine.plugins.FlutterPlugin | ||
import io.flutter.plugin.common.MethodCall | ||
import io.flutter.plugin.common.MethodChannel | ||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler | ||
import io.flutter.plugin.common.MethodChannel.Result | ||
import io.flutter.plugin.common.PluginRegistry.Registrar | ||
|
||
/** CloudFunctionsWebPlugin */ | ||
public class CloudFunctionsWebPlugin: FlutterPlugin, MethodCallHandler { | ||
override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { } | ||
|
||
// This static function is optional and equivalent to onAttachedToEngine. It supports the old | ||
// pre-Flutter-1.12 Android projects. You are encouraged to continue supporting | ||
// plugin registration via this function while apps migrate to use the new Android APIs | ||
// post-flutter-1.12 via https://flutter.dev/go/android-project-migration. | ||
// | ||
// It is encouraged to share logic between onAttachedToEngine and registerWith to keep | ||
// them functionally equivalent. Only one of onAttachedToEngine or registerWith will be called | ||
// depending on the user's project. onAttachedToEngine or registerWith must both be defined | ||
// in the same class. | ||
companion object { | ||
@JvmStatic | ||
fun registerWith(registrar: Registrar) { } | ||
} | ||
|
||
override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/cloud_functions/cloud_functions_web/ios/cloud_functions_web.podspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. | ||
# Run `pod lib lint cloud_functions_web.podspec' to validate before publishing. | ||
# | ||
Pod::Spec.new do |s| | ||
s.name = 'cloud_functions_web' | ||
s.version = '1.0.0' | ||
s.summary = 'No-op implementation of cloud_functions_web plugin to avoid iOS build issues' | ||
s.description = <<-DESC | ||
Stub/fake cloud_functions_web plugin | ||
DESC | ||
s.homepage = 'https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_functions/cloud_functions_web' | ||
s.license = { :file => '../LICENSE' } | ||
s.author = { 'Flutter Team' => '[email protected]' } | ||
s.source = { :path => '.' } | ||
s.source_files = 'Classes/**/*' | ||
s.dependency 'Flutter' | ||
s.platform = :ios, '8.0' | ||
|
||
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. | ||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } | ||
s.swift_version = '5.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters