Skip to content

refactor: Improve pubspecs files and example projects #956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/dart/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: example
description: example
version: 1.0.0
description: Demonstrates how to use the parse_server_sdk packages.
publish_to: 'none'

version: 1.0.0

environment:
sdk: ">=2.18.0 <4.0.0"

Expand Down
16 changes: 15 additions & 1 deletion packages/dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
name: parse_server_sdk
description: The Dart SDK to connect to Parse Server. Build your apps faster with Parse Platform, the complete application stack.
version: 5.1.3
homepage: https://github.com/parse-community/Parse-SDK-Flutter
homepage: https://parseplatform.org
repository: https://github.com/parse-community/Parse-SDK-Flutter
issue_tracker: https://github.com/parse-community/Parse-SDK-Flutter/issues
documentation: https://docs.parseplatform.org/dart/guide

funding:
- https://opencollective.com/parse-server
- https://github.com/sponsors/parse-community

topics:
- parse
- parse-platform
- parse-server
- node-js
- backend

environment:
sdk: ">=2.18.0 <4.0.0"
Expand Down
26 changes: 1 addition & 25 deletions packages/flutter/example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
avoid_print: false
2 changes: 1 addition & 1 deletion packages/flutter/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ android {
applicationId "com.example.flutter_plugin_example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
minSdkVersion 19
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
3 changes: 0 additions & 3 deletions packages/flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore_for_file: avoid_print

import 'dart:convert';
import 'dart:io';

Expand Down Expand Up @@ -77,7 +75,6 @@ class _MyAppState extends State<MyApp> {
clientKey: keyParseClientKey, debug: true);

//parse serve with secure store and desktop support

// Parse().initialize(keyParseApplicationId, keyParseServerUrl,
// clientKey: keyParseClientKey,
// debug: true);
Expand Down
2 changes: 0 additions & 2 deletions packages/flutter/example/lib/pages/login_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore_for_file: avoid_print

import 'package:flutter/material.dart';
import 'package:flutter_plugin_example/data/model/user.dart';
import 'package:parse_server_sdk_flutter/parse_server_sdk_flutter.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

#include "generated_plugin_registrant.h"

#include <awesome_notifications/awesome_notifications_plugin.h>

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) awesome_notifications_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "AwesomeNotificationsPlugin");
awesome_notifications_plugin_register_with_registrar(awesome_notifications_registrar);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
awesome_notifications
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
Expand Down
10 changes: 3 additions & 7 deletions packages/flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: flutter_plugin_example
description: Demonstrates how to use the flutter_plugin plugin.
description: Demonstrates how to use the parse_server_sdk_flutter plugin.
publish_to: 'none'

version: 1.0.0
Expand All @@ -18,11 +18,9 @@ dependencies:
path: ^1.8.2
path_provider: ^2.0.15
sembast: ^3.4.6+1
shared_preferences: ^2.1.2
shared_preferences: ^2.2.0

dependency_overrides:
# Override to local mono-repo path so devs can test this repo
# against changes that they're making to other mono-repo packages.
parse_server_sdk:
path: ../../dart

Expand All @@ -33,7 +31,6 @@ dev_dependencies:
flutter_lints: ^2.0.1
mockito: ^5.3.2


flutter:
uses-material-design: true
assets:
Expand All @@ -52,5 +49,4 @@ flutter:
- asset: fonts/Roboto/Roboto-Bold.ttf
weight: 700
- asset: fonts/Roboto/Roboto-Black.ttf
weight: 900

weight: 900
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@

#include "generated_plugin_registrant.h"

#include <awesome_notifications/awesome_notifications_plugin_c_api.h>
#include <connectivity_plus/connectivity_plus_windows_plugin.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
AwesomeNotificationsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("AwesomeNotificationsPluginCApi"));
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
awesome_notifications
connectivity_plus
)

Expand Down
18 changes: 16 additions & 2 deletions packages/flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
name: parse_server_sdk_flutter
description: The Flutter SDK to connect to Parse Server. Build your apps faster with Parse Platform, the complete application stack.
version: 6.0.0
homepage: https://github.com/parse-community/Parse-SDK-Flutter
homepage: https://parseplatform.org
repository: https://github.com/parse-community/Parse-SDK-Flutter
issue_tracker: https://github.com/parse-community/Parse-SDK-Flutter/issues
documentation: https://docs.parseplatform.org/flutter/guide

funding:
- https://opencollective.com/parse-server
- https://github.com/sponsors/parse-community

topics:
- parse
- parse-platform
- parse-server
- node-js
- backend

environment:
sdk: ">=2.18.0 <4.0.0"
Expand Down Expand Up @@ -38,4 +52,4 @@ dev_dependencies:

screenshots:
- description: Parse Platform logo.
path: screenshots/logo.png
path: screenshots/logo.png