pd4d10 / git-touch

An open-source app for GitHub, GitLab, Bitbucket, Gitea, and Gitee(码云), built with Flutter
Apache License 2.0
1.56k stars 138 forks source link

F-Droid build failed #239

Open linsui opened 3 years ago

linsui commented 3 years ago
The current Dart SDK version is 2.10.4.
Because git_touch requires SDK version >=2.12.0 <3.0.0, version solving failed.

Which flutter version should be used? Thanks!

pd4d10 commented 3 years ago

Stable channel should be fine

linsui commented 3 years ago

I tried 2.2.1 and it stucked forever.

pd4d10 commented 3 years ago

This is the version in my local machine:

> flutter --version
Flutter 2.2.1 • channel stable • git@github.com:flutter/flutter.git
Framework • revision 02c026b03c (7 days ago) • 2021-05-27 12:24:44 -0700
Engine • revision 0fdb562ac8
Tools • Dart 2.13.1
linsui commented 3 years ago

The build recipe is

  - versionName: 1.12.4
    versionCode: 25
    commit: v1.12.4
    output: build/app/outputs/flutter-apk/app-release.apk
    srclibs:
      - flutter@2.2.1
    build:
      - $$flutter$$/bin/flutter config --no-analytics
      - $$flutter$$/bin/flutter build apk --no-tree-shake-icons

It stuck at

To see a detailed report, use the untranslated-messages-file 
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection> 
This will generate a JSON format file containing all messages that 
need to be translated.
lib/screens/ge_search.dart:28:39: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null.
  String get _keyword => _controller!.text?.trim() ?? '';
                                      ^
lib/screens/gh_repo.dart:273:54: Warning: Operand of null-aware operation '?.' has type 'GRepoCommit_history' which excludes null.
 - 'GRepoCommit_history' is from 'package:git_touch/graphql/github.data.gql.dart' ('lib/graphql/github.data.gql.dart').
                        ((ref.target as GRepoCommit).history?.totalCount ?? 0)
                                                     ^
lib/screens/gl_search.dart:29:39: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null.
  String get _keyword => _controller!.text?.trim() ?? '';
                                      ^
lib/screens/gh_search.dart:28:39: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null.
  String get _keyword => _controller!.text?.trim() ?? '';
                                      ^
shreyas1599 commented 3 years ago

The current Dart SDK version is 2.10.4. I tried 2.2.1 and it stucked forever.

@linsui seems like your dart version is 2.10.4 but your flutter version is fine. You've to update dart to >=2.12.0 separately. Or are you already using dart >= 2.12.0?

linsui commented 3 years ago

The current Dart SDK version is 2.10.4.

This is from an old flutter version. I'm not sure which Dart version is used. The full log is available at https://gitlab.com/linsui/fdroiddata/-/jobs/1321205433 if it's useful.

shreyas1599 commented 3 years ago

Oh ok

  String get _keyword => _controller!.text?.trim() ?? '';
                                      ^
lib/screens/gh_repo.dart:273:54: Warning: Operand of null-aware operation '?.' has type 'GRepoCommit_history' which excludes null.
 - 'GRepoCommit_history' is from 'package:git_touch/graphql/github.data.gql.dart' ('lib/graphql/github.data.gql.dart').
                        ((ref.target as GRepoCommit).history?.totalCount ?? 0)
                                                     ^
lib/screens/gl_search.dart:29:39: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null.
  String get _keyword => _controller!.text?.trim() ?? '';
                                      ^
lib/screens/gh_search.dart:28:39: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null.
  String get _keyword => _controller!.text?.trim() ?? '';

These shouldn't cause a problem. They're just warnings. I tried building an android release on my local machine and it works fine. Not sure what the problem is. Did a re-run of the build also not work?

linsui commented 3 years ago

I tried to rerun it but got the same error.

linsui commented 3 years ago

1.13.0 stuch at

"ca": 4 untranslated message(s).
"hu": 87 untranslated message(s).
"ru": 15 untranslated message(s).
"si": 85 untranslated message(s).
To see a detailed report, use the untranslated-messages-file 
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection> 
This will generate a JSON format file containing all messages that 
need to be translated.
shreyas1599 commented 3 years ago

@linsui is there any way to test this locally? Do you have any links?

linsui commented 3 years ago

Yes, you can test it with fdroidserver locally. The gitlab CI use the docker image.

michaelblyons commented 3 years ago

Please note that the last available F-Droid version does not include #236, so GitHub authentication does not work for new users. They cannot complete the auth flow.