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.7k
[shared_preferences] Adds macOS support with example app #2385
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b59c4b9
Add macos and example
franciscojma86 f82742d
Add change log
franciscojma86 0be06ba
Update podspec
franciscojma86 e2e8398
Change license
franciscojma86 09c7b46
pubspecs
franciscojma86 9f7e967
Update versions in other packages
franciscojma86 99bafd2
Fix version
franciscojma86 cd8f325
Update packages/shared_preferences/shared_preferences_macos/CHANGELOG.md
franciscojma86 d05b18b
Remove android dummy app
franciscojma86 8e8ec70
Bump version
franciscojma86 9b6aaf3
Update other versions
franciscojma86 a46612d
Add macos example
franciscojma86 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
Next
Next commit
Add macos and example
- Loading branch information
commit b59c4b96a07d88e535c310b363f79a729703944a
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
packages/shared_preferences/shared_preferences_macos/LICENSE
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,26 @@ | ||
| Copyright 2017, the Flutter project 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. |
32 changes: 32 additions & 0 deletions
32
packages/shared_preferences/shared_preferences_macos/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,32 @@ | ||
| # shared_preferences_macos | ||
|
|
||
| The macos implementation of [`shared_preferences`][1]. | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Import the package | ||
|
|
||
| To use this plugin in your Flutter app, simply add it as a dependency in | ||
| your `pubspec.yaml` alongside the base `shared_preferences` plugin. | ||
|
|
||
| _(This is only temporary: in the future we hope to make this package an | ||
| "endorsed" implementation of `shared_preferences`, so that it is automatically | ||
| included in your Flutter app when you depend on `package:shared_preferences`.)_ | ||
|
|
||
| This is what the above means to your `pubspec.yaml`: | ||
|
|
||
| ```yaml | ||
| ... | ||
| dependencies: | ||
| ... | ||
| shared_preferences: ^0.5.4+8 | ||
| shared_preferences_macos: ^0.1.0 | ||
| ... | ||
| ``` | ||
|
|
||
| ### Use the plugin | ||
|
|
||
| Once you have the `shared_preferences_macos` dependency in your pubspec, you should | ||
| be able to use `package:shared_preferences` as normal. | ||
|
|
||
| [1]: ../shared_preferences/shared_preferences_macos |
8 changes: 8 additions & 0 deletions
8
packages/shared_preferences/shared_preferences_macos/android/.gitignore
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 @@ | ||
| *.iml | ||
| .gradle | ||
| /local.properties | ||
| /.idea/workspace.xml | ||
| /.idea/libraries | ||
| .DS_Store | ||
| /build | ||
| /captures |
37 changes: 37 additions & 0 deletions
37
packages/shared_preferences/shared_preferences_macos/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,37 @@ | ||
| group 'com.example.shared_preferences' | ||
| version '1.0' | ||
|
|
||
| buildscript { | ||
| repositories { | ||
| google() | ||
| jcenter() | ||
| } | ||
|
|
||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:3.5.0' | ||
| } | ||
| } | ||
|
|
||
| rootProject.allprojects { | ||
| repositories { | ||
| google() | ||
| jcenter() | ||
| } | ||
| } | ||
|
|
||
| apply plugin: 'com.android.library' | ||
|
|
||
| android { | ||
| compileSdkVersion 28 | ||
|
|
||
| defaultConfig { | ||
| minSdkVersion 16 | ||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
| } | ||
| lintOptions { | ||
| disable 'InvalidPackage' | ||
| } | ||
| dependencies { | ||
| implementation 'androidx.annotation:annotation:1.0.0' | ||
| } | ||
| } |
4 changes: 4 additions & 0 deletions
4
packages/shared_preferences/shared_preferences_macos/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
...red_preferences/shared_preferences_macos/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-4.10.2-all.zip |
1 change: 1 addition & 0 deletions
1
packages/shared_preferences/shared_preferences_macos/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 = 'shared_preferences' |
3 changes: 3 additions & 0 deletions
3
packages/shared_preferences/shared_preferences_macos/android/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,3 @@ | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| package="com.example.shared_preferences"> | ||
| </manifest> |
22 changes: 22 additions & 0 deletions
22
...s_macos/android/src/main/java/com/example/shared_preferences/SharedPreferencesPlugin.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,22 @@ | ||
| package com.example.shared_preferences; | ||
|
|
||
| import androidx.annotation.NonNull; | ||
| import io.flutter.embedding.engine.plugins.FlutterPlugin; | ||
| import io.flutter.plugin.common.MethodCall; | ||
| import io.flutter.plugin.common.MethodChannel.MethodCallHandler; | ||
| import io.flutter.plugin.common.MethodChannel.Result; | ||
| import io.flutter.plugin.common.PluginRegistry.Registrar; | ||
|
|
||
| /** SharedPreferencesPlugin */ | ||
| public class SharedPreferencesPlugin implements FlutterPlugin, MethodCallHandler { | ||
| @Override | ||
| public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {} | ||
|
|
||
| public static void registerWith(Registrar registrar) {} | ||
|
|
||
| @Override | ||
| public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {} | ||
|
|
||
| @Override | ||
| public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {} | ||
| } |
8 changes: 8 additions & 0 deletions
8
packages/shared_preferences/shared_preferences_macos/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 @@ | ||
| # shared_preferences_example | ||
|
|
||
| Demonstrates how to use the shared_preferences plugin. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| For help getting started with Flutter, view our online | ||
| [documentation](http://flutter.io/). |
60 changes: 60 additions & 0 deletions
60
packages/shared_preferences/shared_preferences_macos/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,60 @@ | ||
| 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 28 | ||
|
|
||
| lintOptions { | ||
| disable 'InvalidPackage' | ||
| } | ||
|
|
||
| defaultConfig { | ||
| applicationId "io.flutter.plugins.sharedpreferencesexample" | ||
| 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 { | ||
| 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
...ces/shared_preferences_macos/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-5.4.1-all.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
25 changes: 25 additions & 0 deletions
25
...red_preferences/shared_preferences_macos/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,25 @@ | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| package="io.flutter.plugins.sharedpreferencesexample"> | ||
|
|
||
| <uses-permission android:name="android.permission.INTERNET"/> | ||
|
|
||
| <application android:name="io.flutter.app.FlutterApplication" android:label="shared_preferences_example" android:icon="@mipmap/ic_launcher"> | ||
| <activity android:name=".EmbeddingV1Activity" | ||
| android:launchMode="singleTop" | ||
| android:theme="@android:style/Theme.Black.NoTitleBar" | ||
| android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection" | ||
| android:hardwareAccelerated="true" | ||
| android:windowSoftInputMode="adjustResize"> | ||
| </activity> | ||
| <activity android:name=".MainActivity" | ||
| 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> | ||
| </application> | ||
| </manifest> |
18 changes: 18 additions & 0 deletions
18
...id/app/src/main/java/io/flutter/plugins/sharedpreferencesexample/EmbeddingV1Activity.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,18 @@ | ||
| // Copyright 2017 The Chromium 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.sharedpreferencesexample; | ||
|
|
||
| import android.os.Bundle; | ||
| import io.flutter.app.FlutterActivity; | ||
| import io.flutter.plugins.GeneratedPluginRegistrant; | ||
|
|
||
| public class EmbeddingV1Activity extends FlutterActivity { | ||
|
|
||
| @Override | ||
| protected void onCreate(Bundle savedInstanceState) { | ||
| super.onCreate(savedInstanceState); | ||
| GeneratedPluginRegistrant.registerWith(this); | ||
| } | ||
| } |
14 changes: 14 additions & 0 deletions
14
...pp/src/main/java/io/flutter/plugins/sharedpreferencesexample/EmbeddingV1ActivityTest.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 @@ | ||
|
|
||
| package io.flutter.plugins.sharedpreferencesexample; | ||
|
|
||
| import androidx.test.rule.ActivityTestRule; | ||
| import dev.flutter.plugins.e2e.FlutterRunner; | ||
| import org.junit.Rule; | ||
| import org.junit.runner.RunWith; | ||
|
|
||
| @RunWith(FlutterRunner.class) | ||
| public class EmbeddingV1ActivityTest { | ||
| @Rule | ||
| public ActivityTestRule<EmbeddingV1Activity> rule = | ||
| new ActivityTestRule<>(EmbeddingV1Activity.class); | ||
| } |
19 changes: 19 additions & 0 deletions
19
...e/android/app/src/main/java/io/flutter/plugins/sharedpreferencesexample/MainActivity.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 2019 The Chromium 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.sharedpreferencesexample; | ||
|
|
||
| import io.flutter.embedding.android.FlutterActivity; | ||
| import io.flutter.embedding.engine.FlutterEngine; | ||
| import io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin; | ||
|
|
||
| public class MainActivity extends FlutterActivity { | ||
| // TODO(cyanglaz): Remove this once v2 of GeneratedPluginRegistrant rolls to stable. | ||
| // https://github.com/flutter/flutter/issues/42694 | ||
| @Override | ||
| public void configureFlutterEngine(FlutterEngine flutterEngine) { | ||
| super.configureFlutterEngine(flutterEngine); | ||
| flutterEngine.getPlugins().add(new SharedPreferencesPlugin()); | ||
| } | ||
| } |
15 changes: 15 additions & 0 deletions
15
...droid/app/src/main/java/io/flutter/plugins/sharedpreferencesexample/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,15 @@ | ||
| // Copyright 2019 The Chromium 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.sharedpreferencesexample; | ||
|
|
||
| import androidx.test.rule.ActivityTestRule; | ||
| import dev.flutter.plugins.e2e.FlutterRunner; | ||
| import org.junit.Rule; | ||
| import org.junit.runner.RunWith; | ||
|
|
||
| @RunWith(FlutterRunner.class) | ||
| public class MainActivityTest { | ||
| @Rule public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class); | ||
| } | ||
Binary file added
BIN
+544 Bytes
..._preferences_macos/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
..._preferences_macos/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
...preferences_macos/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
...references_macos/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
...eferences_macos/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/shared_preferences/shared_preferences_macos/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() | ||
| jcenter() | ||
| } | ||
|
|
||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:3.4.0' | ||
| } | ||
| } | ||
|
|
||
| allprojects { | ||
| repositories { | ||
| google() | ||
| jcenter() | ||
| } | ||
| } | ||
|
|
||
| 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/shared_preferences/shared_preferences_macos/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.useAndroidX=true | ||
| android.enableJetifier=true | ||
| android.enableR8=true |
5 changes: 5 additions & 0 deletions
5
...erences/shared_preferences_macos/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.4.1-all.zip |
15 changes: 15 additions & 0 deletions
15
packages/shared_preferences/shared_preferences_macos/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.