buttercup / buttercup-mobile

:iphone: React-Native mobile application for Buttercup
https://buttercup.pw
GNU General Public License v3.0
399 stars 71 forks source link

Publish Buttercup to F-droid #75

Open ghost opened 6 years ago

ghost commented 6 years ago

Please publish Buttercup to F-droid.

Some users (including myself) refuse to use the Google Play store and so you should distribute it outside of it. Thank you for this awesome app. :)

https://f-droid.org/en/contribute/

perry-mitchell commented 6 years ago

I think this would be great. We don't currently have the bandwidth to do this ourselves currently, but we'll accept any changes required to get this working. I found some inclusion instructions which may help.

ghost commented 6 years ago

OK let me help you with this. There a two ways, a easy one and a difficult.

Easy (only works if release file is smaller then 10mb): With every release upload a signed apk file here in github and then I will ask Izzy to add it to bis fdroid repo.

https://apt.izzysoft.de/fdroid/index.php

Difficult: First if all you must be free oft

When this is done we go to the next step.

violoncelloCH commented 6 years ago

hopefully the more difficult option can be done... otherwise it's not in main / standard f-droid repository

ghost commented 6 years ago

I hope so too

Am 4. November 2018 10:30:21 MEZ schrieb violoncelloch notifications@github.com:

hopefully the more difficult option can be done... otherwise it's not in main / standard f-droid repository

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/buttercup/buttercup-mobile/issues/75#issuecomment-435654706

-- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

perry-mitchell commented 6 years ago

@beli3ver Thanks for the info! We're not, to my knowledge, using any google libs, ad libraries or non-free build tools. Apart from our compiled crypto binaries we're pretty stock standard. Not 100% sure on the build size though.

We're currently having issues compiling the app and are trying to fix React-Native issues, so bear with us while we get the mobile app back on track.

EDavidF commented 4 years ago

Is there any movement on this? I started using BC on Ubuntu assuming I could grab APK somewhere besides Play. I will build if I must, but at least setting up a Release tab here would be helpful (didn't even find BC on apkmirror...).

perry-mitchell commented 4 years ago

I don't have time to follow up with this personally at the moment, but from what I can see it's a simple matter of adding an issue for Buttercup in their issue tracker. So perhaps anyone might be able to do that. I'm happy to go on record as supporting the addition - this seems to be part of the inclusion criteria.

I'm not sure if they need anything to be able to build Buttercup - I presume there might be something? Do we need to be able to provide APKs?

Also, we are now using Google Play services, so I'm not sure if this disqualifies us.

Their site was super slow today so I gave up trying to dig through it. Might try again later.

EDavidF commented 4 years ago

@perry-mitchell using Google Play Services requires users to either know some pretty sophisticated workarounds, or to sacrifice a considerable amount of privacy (activity, contacts, calendar, etc). Is that really what you want to require of people to use your app?

sallar commented 4 years ago

@EDavidF We tried avoiding Google Play services on Android, but the only way we found to make authenticating with Google APIs work nicely is using the Google Play services. We would welcome any PRs or solutions that fix this issue, but for the time being, I'm not sure what we can do about it...

perry-mitchell commented 4 years ago

@EDavidF I'm all for guaranteed privacy, but it's a trade off of usability versus privacy concerns. Google Drive is a must-have for us, and we've added support for it using what I believe to be the standard method (via google play). As Sallar said we would welcome PRs that provide a better solution, but that's not feasible unless someone else provides it.. at least for now.

violoncelloCH commented 4 years ago

Would it maybe be possible to add a f-droid build flavour without Google Drive support and without the resp. google services?

perry-mitchell commented 4 years ago

@violoncelloCH If someone wants to go to the effort of creating a separate build cycle that strips this, then sure 😅. But I imagine that this would be a huge amount of effort to do and maintain.

I think the only reasonable way forward would be to create a build that doesn't require the play services.

The funny thing is, is that our internal Google Drive client does not require Google play - only the authentication (sign-in) part does. The reason we do it with 2 libraries is that it's notoriously tricky to get the authentication part right, as Google doesn't let you use any old webview for sign-in. The react-native-google-signin library we use probably spawns its own real browser component to do the sign in, which is why we use it - it works.

perry-mitchell commented 4 years ago

This is now blocked by #244 - We need to remove the dependency on Google APIs for sign in, or create a build that doesn't use Google Drive at all.

As neither Sallar nor myself have time for this, we'd be happy to receive help with getting this solved.

perry-mitchell commented 2 years ago

Google dependency (Play dependency) was removed in v2. Once the android app is live, I see no issues with it going to F-Droid. Would someone be willing to assist in publishing it there?

Balthazar1234 commented 2 years ago

Google dependency (Play dependency) was removed in v2. Once the android app is live, I see no issues with it going to F-Droid. Would someone be willing to assist in publishing it there?

I want to thank you for working on this, I wish I would have the knowledge to assist. Buttercup is next to bitwarden and keepass by far the best password manager on android.

licaon-kter commented 2 years ago

This depends on Java 14 or is 11 enough?

perry-mitchell commented 2 years ago

I don't think 14 is a hard requirement, it was just what I used at the time of creating the tests.

Why is 11 required though?

licaon-kter commented 2 years ago

You're not using Gradle >7 so it is not required. Current buildserver has 11 so I used it as closer to that 14. Will test with 8 too.

licaon-kter commented 2 years ago

regarding bcpkix-jdk15on-1.56.0.0, core-1.56.0.0 and prov-1.56.0.0, why do you need .jars instead of getting them from maven (https://mvnrepository.com/artifact/org.bouncycastle) in your build.gradle?

For F-Droid we'll need to remove the .jars and inject implementation org.bouncy...

licaon-kter commented 2 years ago

In the mean time, this recipe metadata/com.buttercup.yml (yarn is used to rebuild reanimated from source)

License: Unknown
SourceCode: https://github.com/buttercup/buttercup-mobile/
IssueTracker: https://github.com/buttercup/buttercup-mobile//issues

AutoName: Buttercup

RepoType: git
Repo: https://github.com/buttercup/buttercup-mobile/

Builds:
  - versionName: 2.4.2
    versionCode: 133
    commit: b5dd2e14a81249bbaa9dfa685220fac58221f43c
    subdir: android/app
    sudo:
      - sysctl fs.inotify.max_user_watches=524288
      - curl -Lo node.tar.xz https://nodejs.org/dist/v16.16.0/node-v16.16.0-linux-x64.tar.xz
      - echo "edcb6e9bb049ae365611aa209fc03c4bfc7e0295dbcc5b2f1e710ac70384a8ec node.tar.xz"
        | sha256sum -c -
      - tar xJf node.tar.xz
      - cp -a node-v16.16.0-linux-x64/. /usr/local/
      - npm install -g npm@8.5.5
      - npm --global install yarn
    init: npm install
    gradle:
      - yes
    srclibs:
      - react-native-reanimated@2.2.3
    scanignore:
      - android/build.gradle
      - node_modules/jsc-android
      - node_modules/hermes-engine
      - node_modules/react-native/android
      - node_modules/@georstat/react-native-image-cache/node_modules/react-native-file-access/android/build.gradle
      - node_modules/@react-native-async-storage/async-storage/android/build.gradle
      - node_modules/@react-native-community/masked-view/android/build.gradle
      - node_modules/react-native-file-access/android/build.gradle
      - node_modules/react-native/ReactAndroid/build.gradle
      - node_modules/react-native-safe-area-context/android/build.gradle
      - node_modules/react-native-screens/android/build.gradle
      - node_modules/react-native-secure-storage/android/build.gradle
      - node_modules/react-native-svg/android/build.gradle
      - node_modules/react-native/template/android/build.gradle
    scandelete:
      - android/
      - node_modules/
    build:
      - REACT_NATIVE_VERSION=`npm pkg get 'dependencies.react-native' | sed -E 's/^"([0-9]+\.[0-9]+\.[0-9]+)"/\1/'`
      - REACT_NATIVE_VERSION_MINOR=`echo ${REACT_NATIVE_VERSION} | sed -E 's/^[0-9]+\.([0-9]+)\.[0-9]+/\1/'`
      - pushd $$react-native-reanimated$$
      - pushd ..
      - yarn add react-native@"${REACT_NATIVE_VERSION}"
      - popd
      - FOR_HERMES=True gradle :assembleRelease
      - popd
      - mv $$react-native-reanimated$$/build/outputs/aar/android-release.aar ../../node_modules/react-native-reanimated/android/react-native-reanimated-${REACT_NATIVE_VERSION_MINOR}-hermes.aar

AutoUpdateMode: None
UpdateCheckMode: Tags

...fails

...
> Task :react-native-fs:bundleLibCompileToJarRelease

> Task :react-native-gesture-handler:compileReleaseKotlin FAILED
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
    /home/vagrant/.gradle/caches/transforms-3/f28135687ec29fd0a9846d3bbfa908d2/transformed/jetified-kotlin-stdlib-jdk8-1.4.10.jar (version 1.4)
    /home/vagrant/.gradle/caches/transforms-3/91321da7bd0dc1f16cd547b731b3e152/transformed/jetified-kotlin-stdlib-jdk7-1.4.10.jar (version 1.4)
    /home/vagrant/.gradle/caches/transforms-3/55b674284cac33e44d63764fc34458df/transformed/jetified-kotlin-stdlib-1.5.20.jar (version 1.5)
    /home/vagrant/.gradle/caches/transforms-3/7768e2130bfb235ecaa5b58140eca761/transformed/jetified-kotlin-stdlib-common-1.5.20.jar (version 1.5)
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
e: /home/vagrant/build/com.buttercup/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt: (11, 22): Unresolved reference: common
e: /home/vagrant/build/com.buttercup/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt: (17, 47): Unresolved reference: GestureHandlerStateManager
e: /home/vagrant/build/com.buttercup/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt: (400, 3): 'setGestureHandlerState' overrides nothing
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

FAILURE: Build failed with an exception.

@perry-mitchell Thoughts?

linsui commented 2 years ago

https://github.com/software-mansion/react-native-gesture-handler/blob/bc585dd6c62c98d54d1037a07702b78340e33e4b/android/build.gradle#L133 Looks like related.

licaon-kter commented 2 years ago

So it doesn't like that I'm building reanimated from source?

linsui commented 2 years ago

It seems that reanimated is found but not used. Maybe something is scandeleted.

licaon-kter commented 2 years ago

Current recipe builds only Hermes version, maybe it wants JSC too?

linsui commented 2 years ago

No idea. Maybe you need to check the directory.