nextcloud / passman-android

:key: Android app for Passman.
https://passman.cc
GNU General Public License v3.0
92 stars 30 forks source link

F-Droid can't build #168

Closed licaon-kter closed 3 months ago

licaon-kter commented 3 months ago

I guess https://github.com/nextcloud/passman-android/blob/v1.5.0/build-openssl.sh does not fail of openssl build fails and then carries on failing later: https://gitlab.com/fdroid/fdroiddata/-/jobs/6436557303#L2661

Anyway, I guess I've fixed that (specifying ndk as 21.4.7075529 in the recipe), but then

...
> Task :app:compileReleaseJavaWithJavac
/home/vagrant/build/es.wolfi.app.passman/app/src/main/java/es/wolfi/app/passman/adapters/CredentialViewAdapter.java:90: error: cannot find symbol
                holder.contentImage.setBackgroundColor(holder.mView.getResources().getColor(R.color.cardview_dark_background));
                                                                                                   ^
  symbol:   variable cardview_dark_background
  location: class color
/home/vagrant/build/es.wolfi.app.passman/app/src/main/java/es/wolfi/app/passman/fragments/CredentialDisplayFragment.java:258: error: cannot find symbol
                credentialIcon.setBackgroundColor(getResources().getColor(R.color.cardview_dark_background));
                                                                                 ^
  symbol:   variable cardview_dark_background
  location: class color
/home/vagrant/build/es.wolfi.app.passman/app/src/main/java/es/wolfi/app/passman/activities/PasswordListActivity.java:635: error: constant expression required
            case R.id.action_settings:
                     ^
/home/vagrant/build/es.wolfi.app.passman/app/src/main/java/es/wolfi/app/passman/activities/PasswordListActivity.java:638: error: constant expression required
            case R.id.action_faq:
                     ^
/home/vagrant/build/es.wolfi.app.passman/app/src/main/java/es/wolfi/app/passman/activities/PasswordListActivity.java:643: error: constant expression required
            case R.id.action_refresh:
                     ^

full log: es.wolfi.app.passman_18.log.gz

what did I miss?

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/efe57af9800cb0ada8dd3c9d4de86cc03ca0a0fa

binsky08 commented 3 months ago

Thanks for report and the ndk definition fix @licaon-kter.

I think changing gradleprops to the following should fix the build:

gradleprops:
      - android.useAndroidX=true
      - android.enableJetifier=true
      - android.nonTransitiveRClass=false
      - android.nonFinalResIds=false

Should I open a pull request for the metadata file or would you take care of it?

licaon-kter commented 3 months ago

that works: thanks, https://gitlab.com/fdroid/fdroiddata/-/commit/03bead9153d03f531dcec655eb32744f0ab507f2

why aren't you putting those in https://github.com/nextcloud/passman-android/blob/master/gradle.properties ?

binsky08 commented 3 months ago

the customized properties are already part of gradle.properties.example

gradle.properties is a copy of it and in .gitignore since we have also keystore passwords in it

licaon-kter commented 3 months ago

But .example is not used, your CI/local build system could just inject those before building in the actual gradle.properties files, so F-Droid does not need constant maintenance every time you add/remove some entries.