diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000000..c5407f19c9c --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,11 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.224.3/containers/ubuntu/.devcontainer/base.Dockerfile + +# [Choice] Ubuntu version (use hirsuite or bionic on local arm64/Apple Silicon): hirsute, focal, bionic +ARG VARIANT="hirsute" +FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..05f22540965 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,6 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.224.3/containers/ubuntu +{ + "image": "cirrusci/flutter:beta", + "forwardPorts": [3000] +} \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index cdc55b03593..b2222fd49c3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,9 +1,7 @@ # Docs: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically - version: 2 - +enable-beta-ecosystems: true updates: - - package-ecosystem: "github-actions" directory: "/" schedule: @@ -13,8 +11,19 @@ updates: commit-message: prefix: "chore" include: "scope" + - package-ecosystem: "bundler" - directory: "/" + directory: "packages/smooth_app/android" + schedule: + interval: "daily" + labels: + - "dependencies" + commit-message: + prefix: "chore" + include: "scope" + + - package-ecosystem: "bundler" + directory: "packages/smooth_app/ios" schedule: interval: "daily" labels: @@ -22,3 +31,11 @@ updates: commit-message: prefix: "chore" include: "scope" + - package-ecosystem: "pub" + directory: "/packages/smooth_app/" + schedule: + interval: "daily" + commit-message: + prefix: "chore" + include: "scope" +#end diff --git a/.github/pull_request_template.yml b/.github/pull_request_template.yml index 688895959bf..c997dea3b89 100644 --- a/.github/pull_request_template.yml +++ b/.github/pull_request_template.yml @@ -1,10 +1,16 @@ ### What -- description of the PR + +- Changed x to achieve y ### Screenshot -(Insert a screenshot to provide visual record of your changes, if visible) + + ### Fixes bug(s) -- #1, #2 and #3 (change by appropriate issues) + + +- Fixes: #1 +- Closes: #2 + ### Part of - https://github.com/openfoodfacts/smooth-app/issues/525 -(please be as granular as possible) + diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index ca9c692135a..766b1143c84 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -19,7 +19,7 @@ jobs: run: echo ${{ env.RELEASE_VERSION }} - name: Setup Java JDK - uses: actions/setup-java@v3.1.0 + uses: actions/setup-java@v3.3.0 with: distribution: 'zulu' java-version: 11 diff --git a/.github/workflows/auto-assign-pr.yml b/.github/workflows/auto-assign-pr.yml new file mode 100644 index 00000000000..20e97ddc525 --- /dev/null +++ b/.github/workflows/auto-assign-pr.yml @@ -0,0 +1,15 @@ +# .github/workflows/auto-author-assign.yml +name: 'Auto Author Assign' + +on: + pull_request_target: + types: [opened, reopened] + +permissions: + pull-requests: write + +jobs: + assign-author: + runs-on: ubuntu-latest + steps: + - uses: toshimaru/auto-author-assign@v1.5.0 diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index d1c92bd1a8b..f207b6e673c 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -3,7 +3,8 @@ name: Crowdin Action on: push: branches: [ crowdin-trigger ] - + schedule: + - cron: "0 22 * * *" jobs: synchronize-with-crowdin: runs-on: ubuntu-latest @@ -14,7 +15,7 @@ jobs: uses: actions/checkout@v3 - name: crowdin action - uses: crowdin/github-action@1.4.7 + uses: crowdin/github-action@1.4.9 continue-on-error: true with: # Upload sources to Crowdin @@ -71,11 +72,6 @@ jobs: #base_url: 'https://crowdin.com' # Path to your project directory on a local machine #base_path: '/openfoodfacts' - # Path to the source files - # source: # optional - source: 'packages/smooth_app/lib/l10n/app_en.arb' - # Path to the translation files - translation: 'packages/smooth_app/lib/l10n/app_%two_letters_code%.arb' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} diff --git a/.github/workflows/dartdoc.yml b/.github/workflows/dartdoc.yml index d25a4e02b8a..50866cc3c9f 100644 --- a/.github/workflows/dartdoc.yml +++ b/.github/workflows/dartdoc.yml @@ -30,7 +30,7 @@ run: pub global activate dartdoc && dartdoc - name: Deploy API documentation to Github Pages - uses: JamesIves/github-pages-deploy-action@v4.3.0 + uses: JamesIves/github-pages-deploy-action@v4.3.3 with: BRANCH: gh-pages FOLDER: packages/smooth_app/doc/api/ diff --git a/.github/workflows/github-projects-for-openfoodfacts-design.yml b/.github/workflows/github-projects-for-openfoodfacts-design.yml new file mode 100644 index 00000000000..9a85f688324 --- /dev/null +++ b/.github/workflows/github-projects-for-openfoodfacts-design.yml @@ -0,0 +1,18 @@ +name: Add mockup-required and mockup-available issues to the openfoodfacts-design project + +on: + issues: + types: + - labeled + +jobs: + add-to-project: + name: Add issue to the openfoodfacts-design project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@main + with: + project-url: https://github.com/orgs/openfoodfacts/projects/11 + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} + labeled: mockups available, needs mockup + label-operator: OR diff --git a/.github/workflows/github-projects.yml b/.github/workflows/github-projects.yml index 003f876083f..ba1dec2794e 100644 --- a/.github/workflows/github-projects.yml +++ b/.github/workflows/github-projects.yml @@ -4,11 +4,14 @@ on: issues: types: - opened - + pull_request: + types: + - opened jobs: add-to-project: name: Add issue to project runs-on: ubuntu-latest + if: github.event.pull_request.head.repo.full_name == github.repository steps: - uses: actions/add-to-project@main with: diff --git a/.github/workflows/ios-release.yml b/.github/workflows/ios-release.yml index 5a4deb96ff8..b0364148f2e 100644 --- a/.github/workflows/ios-release.yml +++ b/.github/workflows/ios-release.yml @@ -26,7 +26,7 @@ jobs: ruby-version: 3.0.2 - name: Setup Java JDK - uses: actions/setup-java@v3.1.0 + uses: actions/setup-java@v3.3.0 with: distribution: 'zulu' java-version: 11 @@ -36,11 +36,14 @@ jobs: with: channel: stable cache: true - cache-key: flutter2.10 #change this to force refresh cache + cache-key: flutter2.10 # change this to force refresh cache - run: flutter --version - name: Get dependencies run: ci/pub_upgrade.sh + + - name: "Update Sentry, see: https://github.com/openfoodfacts/smooth-app/issues/1300" + run: cd ./packages/smooth_app/ios && pod update Sentry - name: Bundle install run: cd ./packages/smooth_app/ios && gem install bundler:1.17.3 && bundle install diff --git a/.github/workflows/postsubmit.yml b/.github/workflows/postsubmit.yml index 5c238bbdc90..96fe41df030 100644 --- a/.github/workflows/postsubmit.yml +++ b/.github/workflows/postsubmit.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v3 - name: Setup Java JDK - uses: actions/setup-java@v3.1.0 + uses: actions/setup-java@v3.3.0 with: distribution: 'zulu' java-version: 11 @@ -47,7 +47,8 @@ jobs: - name: Upload coverage to codecov uses: codecov/codecov-action@v3 with: - fail_ci_if_error: true + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos verbose: true # Build apk. diff --git a/README.md b/README.md index ef3eb5aba3d..5b0a36d3981 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,8 @@ We are always looking for new contributors, if you're willing to help please let - [Smoothie marketing automation repository](https://github.com/openfoodfacts/fastlane-descriptions-smoothie/pulls) - [UX mockups are located here](https://www.figma.com/file/lhRhMulB4Ek9NYDWl3FxAo/Fellowship-Jam-file?node-id=12%3A358). Please be aware that some of them have not been validated, so don't rush in implementing them. - [Continuous Integration documentation](.github/workflows/README.md) - +- [Smoothie Landing page](https://github.com/openfoodfacts/smoothielanding) +- Private app signing for iOS certificates repository - please ask @teolemon ## V1 Roadmap - [ ] Minimal editing/addition value proposition - [ ] [V1 tracking](https://github.com/orgs/openfoodfacts/projects/7) diff --git a/crowdin.yml b/crowdin.yml index 2b56de6acec..0b0002a6af8 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,2 +1,8 @@ project_id_env: CROWDIN_PROJECT_ID api_token_env: CROWDIN_PERSONAL_TOKEN +files: + - source: 'packages/smooth_app/lib/l10n/app_en.arb' + translation: 'packages/smooth_app/lib/l10n/app_%two_letters_code%.arb' + - source: 'packages/smooth_app/ios/Runner/en.lproj/InfoPlist.strings' + translation: 'packages/smooth_app/ios/Runner/%two_letters_code%.lproj/InfoPlist.strings' + diff --git a/packages/smooth_app/analysis_options.yaml b/packages/smooth_app/analysis_options.yaml index 5a5715f6dc3..688465bb21c 100644 --- a/packages/smooth_app/analysis_options.yaml +++ b/packages/smooth_app/analysis_options.yaml @@ -28,6 +28,7 @@ linter: always_put_control_body_on_new_line: true always_require_non_null_named_parameters: true always_specify_types: true + always_use_package_imports: true annotate_overrides: true avoid_bool_literals_in_conditional_expressions: true avoid_classes_with_only_static_members: true diff --git a/packages/smooth_app/android/Gemfile b/packages/smooth_app/android/Gemfile index a9ac6f78e52..98b79dea5f5 100644 --- a/packages/smooth_app/android/Gemfile +++ b/packages/smooth_app/android/Gemfile @@ -1,11 +1,6 @@ -# Autogenerated by fastlane -# -# Ensure this file is checked in to source control! - source "https://rubygems.org" gem "fastlane" gem "fastlane-plugin-flutter_version", git: "https://github.com/tianhaoz95/fastlane-plugin-flutter-version" -plugins_path = File.join(File.dirname(__FILE__), './fastlane', 'Pluginfile') -eval_gemfile(plugins_path) if File.exist?(plugins_path) \ No newline at end of file +eval_gemfile("./fastlane/Pluginfile") diff --git a/packages/smooth_app/android/Gemfile.lock b/packages/smooth_app/android/Gemfile.lock index 1c41526b01f..74c7d6791bf 100644 --- a/packages/smooth_app/android/Gemfile.lock +++ b/packages/smooth_app/android/Gemfile.lock @@ -14,20 +14,20 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.565.0) - aws-sdk-core (3.129.0) + aws-partitions (1.579.0) + aws-sdk-core (3.130.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.55.0) + aws-sdk-kms (1.56.0) aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) aws-sdk-s3 (1.113.0) aws-sdk-core (~> 3, >= 3.127.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) - aws-sigv4 (1.4.0) + aws-sigv4 (1.5.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.1.0) @@ -42,7 +42,7 @@ GEM unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) emoji_regex (3.2.3) - excon (0.91.0) + excon (0.92.2) faraday (1.10.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -72,7 +72,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.6) - fastlane (2.204.3) + fastlane (2.205.2) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -114,7 +114,7 @@ GEM fastlane-plugin-flutter_dart_version_manager (0.1.5) fastlane-plugin-versioning (0.5.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.16.0) + google-apis-androidpublisher_v3 (0.19.0) google-apis-core (>= 0.4, < 2.a) google-apis-core (0.4.2) addressable (~> 2.5, >= 2.5.1) @@ -129,15 +129,15 @@ GEM google-apis-core (>= 0.4, < 2.a) google-apis-playcustomapp_v1 (0.7.0) google-apis-core (>= 0.4, < 2.a) - google-apis-storage_v1 (0.11.0) + google-apis-storage_v1 (0.13.0) google-apis-core (>= 0.4, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) - google-cloud-env (1.5.0) - faraday (>= 0.17.3, < 2.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) google-cloud-errors (1.2.0) - google-cloud-storage (1.36.1) + google-cloud-storage (1.36.2) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) @@ -145,7 +145,7 @@ GEM google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.1.2) + googleauth (1.1.3) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) memoist (~> 0.16) @@ -169,7 +169,7 @@ GEM optparse (0.1.1) os (1.1.4) plist (3.6.0) - public_suffix (4.0.6) + public_suffix (4.0.7) rake (13.0.6) representable (3.1.1) declarative (< 0.1.0) @@ -200,7 +200,7 @@ GEM uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.8) + unf_ext (0.0.8.1) unicode-display_width (1.8.0) webrick (1.7.0) word_wrap (1.0.0) diff --git a/packages/smooth_app/android/app/src/main/AndroidManifest.xml b/packages/smooth_app/android/app/src/main/AndroidManifest.xml index a960ca2050d..10626abf345 100644 --- a/packages/smooth_app/android/app/src/main/AndroidManifest.xml +++ b/packages/smooth_app/android/app/src/main/AndroidManifest.xml @@ -24,7 +24,7 @@