diff --git a/.travis.yml b/.travis.yml index ae47eac..80c252c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,70 @@ -os: - - linux -sudo: false -addons: - apt: - # Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18 - sources: - - ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version - packages: - - libstdc++6 - - fonts-droid -before_script: - - git clone https://github.com/flutter/flutter.git -b master --depth 1 - - ./flutter/bin/flutter doctor -script: - - ./flutter/bin/flutter test --coverage -after_success: - - bash <(curl -s https://codecov.io/bash) -t $CODE_COV_TOKEN -cache: - directories: - - $HOME/.pub-cache +matrix: + include: + - os: linux + language: android + licenses: + - 'android-sdk-preview-license-.+' + - 'android-sdk-license-.+' + - 'google-gdk-license-.+' + android: + components: + - tools + - platform-tools + - build-tools-25.0.3 + - android-25 + - sys-img-armeabi-v7a-google_apis-25 + - extra-android-m2repository + - extra-google-m2repository + - extra-google-android-support + jdk: oraclejdk8 + sudo: false + addons: + apt: + # Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18 + sources: + - ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version + packages: + - libstdc++6 + - fonts-droid + install: + - wget http://services.gradle.org/distributions/gradle-3.5-bin.zip + - unzip -qq gradle-3.5-bin.zip + - export GRADLE_HOME=$PWD/gradle-3.5 + - export PATH=$GRADLE_HOME/bin:$PATH + - git clone https://github.com/flutter/flutter.git -b alpha --depth 1 + - echo yes | sdkmanager "tools" + - echo yes | sdkmanager "platforms;android-25" + - echo yes | sdkmanager "extras;android;m2repository" + - echo yes | sdkmanager "extras;google;m2repository" + - echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2" + - echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2" + # Check components status + - sdkmanager --list || true + - ./flutter/bin/flutter doctor + before_script: + - ./flutter/bin/flutter packages get + script: + - ./flutter/bin/flutter packages pub run build_runner build apk + - ./flutter/bin/flutter packages pub run build_runner test + - os: osx + language: generic + osx_image: xcode8.3 + install: + - brew update + - brew install libimobiledevice + - brew install ideviceinstaller + - brew install ios-deploy + - git clone https://github.com/flutter/flutter.git -b alpha --depth 1 + before_script: + - ./flutter/bin/flutter packages get + script: + - ./flutter/bin/flutter packages pub run build_runner build ios + cache: + directories: + - $HOME/.pub-cache +notifications: + email: + recipients: + - mathieuauclair@twentythreesolutions.com + on_success: always + on_failure: never diff --git a/README.md b/README.md index 5dc8dbf..280b8fa 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,16 @@ Note: If you're not part of the Comiko project on Firebase, you can either ask t - Place it under `comiko-app/android/app` +## Dart 2 + +Take note that this repository is now set to use dart2 tools with flutter. Commands like pub build, pub test are no longer supported. Please use build runner now! + +``` +❯ flutter packages pub run build_runner test + +``` + + ### Debug firebase auth Get your debug keystore fingerprint. There's no password for debug keystore, just hit enter when asked. diff --git a/analysis_options.yaml b/analysis_options.yaml index 044c5a5..842b81e 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,3 +1,6 @@ +analyzer: + language: + enableSuperMixins: true linter: rules: - always_declare_return_types diff --git a/android/app/build.gradle b/android/app/build.gradle index e82fc04..e3eb9e8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -19,7 +19,6 @@ android { compileSdkVersion 26 buildToolsVersion '26.0.3' - sourceSets { main.java.srcDirs += 'src/main/kotlin' } @@ -30,6 +29,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + multiDexEnabled true applicationId "ca.comiko.comiko" minSdkVersion 16 targetSdkVersion 25 diff --git a/lib/pages/artists_page.dart b/lib/pages/artists_page.dart index 10653f4..63fa950 100644 --- a/lib/pages/artists_page.dart +++ b/lib/pages/artists_page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:comiko/pages/is_page.dart'; import 'package:comiko/widgets/artist_card.dart'; @@ -13,7 +15,7 @@ class ArtistsPage extends StatelessWidget implements IsPage { .collection('artists') .where("deleted", isEqualTo: false) .orderBy('name', descending: false) - .snapshots, + .snapshots(), builder: (context, snapshot) { if (!snapshot.hasData) { return Center( diff --git a/lib/widgets/image_caching_loader.dart b/lib/widgets/image_caching_loader.dart index d9841eb..83dddcc 100644 --- a/lib/widgets/image_caching_loader.dart +++ b/lib/widgets/image_caching_loader.dart @@ -20,7 +20,7 @@ class ImagesCachingLoader extends StatelessWidget { .collection('artists') .where("deleted", isEqualTo: false) .orderBy('name', descending: false) - .snapshots + .snapshots() .first; final cachedImages = []; diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..43de35f --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,627 @@ +# Generated by pub +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.32.4" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.0" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" + async_loader: + dependency: "direct main" + description: + name: async_loader + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.7+3" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.1+2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.2+3" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.1+1" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.1+5" + build_test: + dependency: "direct dev" + description: + name: build_test + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.3+1" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.2" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + cli_util: + dependency: transitive + description: + name: cli_util + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3+2" + cloud_firestore: + dependency: "direct main" + description: + name: cloud_firestore + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.0" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + comiko_backend: + dependency: "direct main" + description: + path: "." + ref: HEAD + resolved-ref: "802a450d2b19628e9ddf1e29853810a6ee28da69" + url: "https://github.com/comiko-app/backend" + source: git + version: "0.0.1" + comiko_shared: + dependency: transitive + description: + path: "." + ref: HEAD + resolved-ref: "81a82ca0b1ea693b58dcd7f67b95e85f5d70ec09" + url: "https://github.com/comiko-app/shared.git" + source: git + version: "0.0.1" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.5" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.3" + firebase_auth: + dependency: "direct main" + description: + name: firebase_auth + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.20" + firebase_core: + dependency: transitive + description: + name: firebase_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.5" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" + flutter_facebook_login: + dependency: "direct main" + description: + name: flutter_facebook_login + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + flutter_redux: + dependency: "direct main" + description: + name: flutter_redux + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.2" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + font_awesome_flutter: + dependency: "direct main" + description: + name: font_awesome_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "8.0.1" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + google_sign_in: + dependency: "direct main" + description: + name: google_sign_in + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.5" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2+1" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.3+3" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+17" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + intl: + dependency: "direct main" + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.15.7" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: "direct dev" + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + json_rpc_2: + dependency: transitive + description: + name: json_rpc_2 + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.9" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.4" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.3+1" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+2" + multi_server_socket: + dependency: transitive + description: + name: multi_server_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.4" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + path: + dependency: "direct main" + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + path_provider: + dependency: transitive + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.1" + plugin: + dependency: transitive + description: + name: plugin + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0+3" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.6" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2+2" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0+1" + redux: + dependency: "direct main" + description: + name: redux + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.3+3" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.8" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.2+4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.5" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.7" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.8" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.14+1" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + synchronized: + dependency: transitive + description: + name: synchronized + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1+1" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + test: + dependency: transitive + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.3" + utf: + dependency: transitive + description: + name: utf + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.0+5" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" + vm_service_client: + dependency: transitive + description: + name: vm_service_client + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.9" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.15" +sdks: + dart: ">=2.0.0 <3.0.0" + flutter: ">=0.2.4 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index deba399..a65e57e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: comiko -description: Comiko +description: comiko dependencies: flutter: @@ -7,24 +7,29 @@ dependencies: redux: "^3.0.0" flutter_redux: "^0.5.0" path: "^1.4.2" - comiko_shared: - git: https://github.com/comiko-app/shared.git comiko_backend: - path: ../comiko_dependencies/backend -# https://github.com/comiko-app/backend.git - cloud_firestore: '^0.2.6' - font_awesome_flutter: '^6.0.0' - url_launcher: "^2.0.1" + git: https://github.com/comiko-app/backend + cloud_firestore: '^0.8.0' + font_awesome_flutter: '^8.0.1' + url_launcher: "^3.0.3" intl: "^0.15.2" - cached_network_image: "^0.3.0" + cached_network_image: "^0.4.1" async_loader: '>=0.1.0 <0.2.0' - firebase_auth: '^0.4.5' - google_sign_in: "^2.1.0" + firebase_auth: '^0.5.19' + google_sign_in: "^3.0.5" flutter_facebook_login: '>=1.0.3 <2.0.0' + dev_dependencies: + json_annotation: "^1.1.0" + build_runner: "^0.10.1" + build_test: "^0.10.3" flutter_test: sdk: flutter +# git & path require json annotation 0.2.2 +dependency_override: + json_annotation: "^1.1.0" + # For information on the generic Dart part of this file, see the # following page: https://www.dartlang.org/tools/pub/pubspec