This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[path_provider] Federate mobile implementations #4465
Merged
stuartmorgan-g
merged 9 commits into
flutter:master
from
stuartmorgan-g:path-provider-full-federation
Nov 10, 2021
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5a696ee
Create iOS and Android packages as duplicates of path_provider
stuartmorgan-g 6d39109
pubspec and CHANGELOG fixes
stuartmorgan-g 02b8f2e
Update tests and examples
stuartmorgan-g 89a06d5
Fix gradle and podspec
stuartmorgan-g 54e7465
Fix iOS native tests
stuartmorgan-g 8aed09a
Throw test fixes
stuartmorgan-g 731455c
Merge branch 'master' into path-provider-full-federation
stuartmorgan-g 0708997
Merge branch 'main' into path-provider-full-federation
stuartmorgan-g ab627fe
Fix READMEs
stuartmorgan-g File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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,66 @@ | ||
# Below is a list of people and organizations that have contributed | ||
# to the Flutter project. Names should be added to the list like so: | ||
# | ||
# Name/Organization <email address> | ||
|
||
Google Inc. | ||
The Chromium Authors | ||
German Saprykin <saprykin.h@gmail.com> | ||
Benjamin Sauer <sauer.benjamin@gmail.com> | ||
larsenthomasj@gmail.com | ||
Ali Bitek <alibitek@protonmail.ch> | ||
Pol Batlló <pol.batllo@gmail.com> | ||
Anatoly Pulyaevskiy | ||
Hayden Flinner <haydenflinner@gmail.com> | ||
Stefano Rodriguez <hlsroddy@gmail.com> | ||
Salvatore Giordano <salvatoregiordanoo@gmail.com> | ||
Brian Armstrong <brian@flutter.institute> | ||
Paul DeMarco <paulmdemarco@gmail.com> | ||
Fabricio Nogueira <feufeu@gmail.com> | ||
Simon Lightfoot <simon@devangels.london> | ||
Ashton Thomas <ashton@acrinta.com> | ||
Thomas Danner <thmsdnnr@gmail.com> | ||
Diego Velásquez <diego.velasquez.lopez@gmail.com> | ||
Hajime Nakamura <nkmrhj@gmail.com> | ||
Tuyển Vũ Xuân <netsoft1985@gmail.com> | ||
Miguel Ruivo <miguel@miguelruivo.com> | ||
Sarthak Verma <sarthak@artiosys.com> | ||
Mike Diarmid <mike@invertase.io> | ||
Invertase <oss@invertase.io> | ||
Elliot Hesp <elliot@invertase.io> | ||
Vince Varga <vince.varga@smaho.com> | ||
Aawaz Gyawali <awazgyawali@gmail.com> | ||
EUI Limited <ian.evans3@admiralgroup.co.uk> | ||
Katarina Sheremet <katarina@sheremet.ch> | ||
Thomas Stockx <thomas@stockxit.com> | ||
Sarbagya Dhaubanjar <sarbagyastha@gmail.com> | ||
Ozkan Eksi <ozeksi@gmail.com> | ||
Rishab Nayak <rishab@bu.edu> | ||
ko2ic <ko2ic.dev@gmail.com> | ||
Jonathan Younger <jonathan@daikini.com> | ||
Jose Sanchez <josesm82@gmail.com> | ||
Debkanchan Samadder <debu.samadder@gmail.com> | ||
Audrius Karosevicius <audrius.karosevicius@gmail.com> | ||
Lukasz Piliszczuk <lukasz@intheloup.io> | ||
SoundReply Solutions GmbH <ch@soundreply.com> | ||
Rafal Wachol <rwachol@gmail.com> | ||
Pau Picas <pau.picas@gmail.com> | ||
Christian Weder <chrstian.weder@yapeal.ch> | ||
Alexandru Tuca <salexandru.tuca@outlook.com> | ||
Christian Weder <chrstian.weder@yapeal.ch> | ||
Rhodes Davis Jr. <rody.davis.jr@gmail.com> | ||
Luigi Agosti <luigi@tengio.com> | ||
Quentin Le Guennec <quentin@tengio.com> | ||
Koushik Ravikumar <koushik@tengio.com> | ||
Nissim Dsilva <nissim@tengio.com> | ||
Giancarlo Rocha <giancarloiff@gmail.com> | ||
Ryo Miyake <ryo@miyake.id> | ||
Théo Champion <contact.theochampion@gmail.com> | ||
Kazuki Yamaguchi <y.kazuki0614n@gmail.com> | ||
Eitan Schwartz <eshvartz@gmail.com> | ||
Chris Rutkowski <chrisrutkowski89@gmail.com> | ||
Juan Alvarez <juan.alvarez@resideo.com> | ||
Aleksandr Yurkovskiy <sanekyy@gmail.com> | ||
Anton Borries <mail@antonborri.es> | ||
Alex Li <google@alexv525.com> | ||
Rahul Raj <64.rahulraj@gmail.com> |
This file contains hidden or 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 @@ | ||
## 2.0.6 | ||
|
||
* Split from `path_provider` as a federated implementation. |
This file contains hidden or 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,25 @@ | ||
Copyright 2013 The Flutter Authors. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
* Neither the name of Google Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains hidden or 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,11 @@ | ||
# path\_provider\_android | ||
|
||
The Android implementation of [`path_provider`]. | ||
|
||
## Usage | ||
|
||
This package is [endorsed][2], which means you can simply use `path_provider` | ||
normally. This package will be automatically included in your app when you do. | ||
|
||
[1]: https://pub.dev/packages/path_provider | ||
[2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
packages/path_provider/path_provider_android/android/settings.gradle
This file contains hidden or 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 = 'path_provider_android' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
packages/path_provider/path_provider_android/example/README.md
This file contains hidden or 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 @@ | ||
# path_provider_example | ||
|
||
Demonstrates how to use the path_provider plugin. | ||
|
||
## Getting Started | ||
|
||
For help getting started with Flutter, view our online | ||
[documentation](https://flutter.dev/). |
64 changes: 64 additions & 0 deletions
64
packages/path_provider/path_provider_android/example/android/app/build.gradle
This file contains hidden or 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,64 @@ | ||
def localProperties = new Properties() | ||
def localPropertiesFile = rootProject.file('local.properties') | ||
if (localPropertiesFile.exists()) { | ||
localPropertiesFile.withReader('UTF-8') { reader -> | ||
localProperties.load(reader) | ||
} | ||
} | ||
|
||
def flutterRoot = localProperties.getProperty('flutter.sdk') | ||
if (flutterRoot == null) { | ||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") | ||
} | ||
|
||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') | ||
if (flutterVersionCode == null) { | ||
flutterVersionCode = '1' | ||
} | ||
|
||
def flutterVersionName = localProperties.getProperty('flutter.versionName') | ||
if (flutterVersionName == null) { | ||
flutterVersionName = '1.0' | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||
|
||
android { | ||
compileSdkVersion 29 | ||
|
||
lintOptions { | ||
disable 'InvalidPackage' | ||
} | ||
|
||
defaultConfig { | ||
applicationId "io.flutter.plugins.pathproviderexample" | ||
minSdkVersion 16 | ||
targetSdkVersion 28 | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
// TODO: Add your own signing config for the release build. | ||
// Signing with the debug keys for now, so `flutter run --release` works. | ||
signingConfig signingConfigs.debug | ||
} | ||
} | ||
} | ||
|
||
flutter { | ||
source '../..' | ||
} | ||
|
||
dependencies { | ||
androidTestImplementation 'androidx.test:runner:1.2.0' | ||
androidTestImplementation 'androidx.test:rules:1.2.0' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
|
||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'androidx.test:runner:1.1.1' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' | ||
} |
5 changes: 5 additions & 0 deletions
5
...ovider/path_provider_android/example/android/app/gradle/wrapper/gradle-wrapper.properties
This file contains hidden or 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 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
14 changes: 14 additions & 0 deletions
14
...roid/example/android/app/src/androidTest/java/io/flutter/plugins/DartIntegrationTest.java
This file contains hidden or 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,14 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
package io.flutter.plugins; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.TYPE) | ||
public @interface DartIntegrationTest {} |
19 changes: 19 additions & 0 deletions
19
...le/android/app/src/androidTest/java/io/flutter/plugins/pathprovider/MainActivityTest.java
This file contains hidden or 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,19 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
package io.flutter.plugins.pathprovider; | ||
|
||
import androidx.test.rule.ActivityTestRule; | ||
import dev.flutter.plugins.integration_test.FlutterTestRunner; | ||
import io.flutter.embedding.android.FlutterActivity; | ||
import io.flutter.plugins.DartIntegrationTest; | ||
import org.junit.Rule; | ||
import org.junit.runner.RunWith; | ||
|
||
@DartIntegrationTest | ||
@RunWith(FlutterTestRunner.class) | ||
public class MainActivityTest { | ||
@Rule | ||
public ActivityTestRule<FlutterActivity> rule = new ActivityTestRule<>(FlutterActivity.class); | ||
} |
20 changes: 20 additions & 0 deletions
20
...ages/path_provider/path_provider_android/example/android/app/src/main/AndroidManifest.xml
This file contains hidden or 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,20 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="io.flutter.plugins.pathproviderexample"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET"/> | ||
|
||
<application android:label="path_provider_example" android:icon="@mipmap/ic_launcher"> | ||
<activity android:name="io.flutter.embedding.android.FlutterActivity" | ||
android:launchMode="singleTop" | ||
android:theme="@android:style/Theme.Black.NoTitleBar" | ||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection" | ||
android:hardwareAccelerated="true" | ||
android:windowSoftInputMode="adjustResize"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<meta-data android:name="flutterEmbedding" android:value="2"/> | ||
</application> | ||
</manifest> |
Binary file added
BIN
+544 Bytes
...h_provider_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+442 Bytes
...h_provider_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+721 Bytes
..._provider_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.01 KB
...provider_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.41 KB
...rovider_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
packages/path_provider/path_provider_android/example/android/build.gradle
This file contains hidden or 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,29 @@ | ||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.3.0' | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
rootProject.buildDir = '../build' | ||
subprojects { | ||
project.buildDir = "${rootProject.buildDir}/${project.name}" | ||
} | ||
subprojects { | ||
project.evaluationDependsOn(':app') | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/path_provider/path_provider_android/example/android/gradle.properties
This file contains hidden or 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,4 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
android.enableR8=true | ||
android.useAndroidX=true | ||
android.enableJetifier=true |
5 changes: 5 additions & 0 deletions
5
...h_provider/path_provider_android/example/android/gradle/wrapper/gradle-wrapper.properties
This file contains hidden or 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-5.1.1-all.zip |
15 changes: 15 additions & 0 deletions
15
packages/path_provider/path_provider_android/example/android/settings.gradle
This file contains hidden or 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,15 @@ | ||
include ':app' | ||
|
||
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() | ||
|
||
def plugins = new Properties() | ||
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') | ||
if (pluginsFile.exists()) { | ||
pluginsFile.withInputStream { stream -> plugins.load(stream) } | ||
} | ||
|
||
plugins.each { name, path -> | ||
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() | ||
include ":$name" | ||
project(":$name").projectDir = pluginDirectory | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.