haiwen / seadroid

Android client for Seafile
Other
539 stars 277 forks source link

F-Droid can't build - firebase needs to be removed or put in a flavor #1002

Closed licaon-kter closed 1 month ago

licaon-kter commented 6 months ago
  - versionName: 3.0.0
    versionCode: 150
    commit: 2f710e284b07dcef09c5f093aff254da348cfdbd
    subdir: app
    sudo:
      - echo "deb https://deb.debian.org/debian bullseye main" > /etc/apt/sources.list.d/bullseye.list
      - apt-get update
      - apt-get install -y maven
      - apt-get install -y -t bullseye openjdk-11-jdk-headless
      - update-java-alternatives --set java-1.11.0-openjdk-amd64
    gradle:
      - yes
    srclibs:
      - android-vcard@android-vcard-1.4
    prebuild:
      - echo -e "android.useAndroidX=true" > ../gradle.properties
      - echo -e "\norg.gradle.jvmargs=-Xms4g -Xmx16g -XX:MaxPermSize=16g -XX:-UseGCOverheadLimit"
        >> ../gradle.properties
      - find $$android-vcard$$ -name '*.jar' -delete
      - sed -i -e '/repositories/a\        mavenLocal()' ../build.gradle
      - sed -i -e 's/implementation fileTree.*/implementation "com.googlecode.android-vcard:android-vcard:1.4"/'
        -e '/firebase/d' -e '/gms/d' build.gradle ../build.gradle
    build: mvn install -f $$android-vcard$$/pom.xml -Dmaven.test.skip=true

updated recipe but...

> Task :app:compileReleaseJavaWithJavac
Note: [1] Wrote GeneratedAppGlideModule with: [com.bumptech.glide.integration.okhttp3.OkHttpLibraryGlideModule]
/home/vagrant/build/com.seafile.seadroid2/app/src/main/java/com/seafile/seadroid2/ui/SplashActivity.java:9: error: package com.google.firebase.analytics does not exist
import com.google.firebase.analytics.FirebaseAnalytics;
                                    ^
/home/vagrant/build/com.seafile.seadroid2/app/src/main/java/com/seafile/seadroid2/ui/main/MainActivity.java:38: error: package com.google.firebase.analytics does not exist
import com.google.firebase.analytics.FirebaseAnalytics;
                                    ^
/home/vagrant/build/com.seafile.seadroid2/app/src/main/java/com/seafile/seadroid2/ui/main/MainActivity.java:39: error: package com.google.firebase.crashlytics does not exist
import com.google.firebase.crashlytics.FirebaseCrashlytics;
                                      ^
/home/vagrant/build/com.seafile.seadroid2/app/src/main/java/com/seafile/seadroid2/ui/settings/SettingsFragment.java:41: error: package com.google.firebase.analytics does not exist
import com.google.firebase.analytics.FirebaseAnalytics;
                                    ^
/home/vagrant/build/com.seafile.seadroid2/app/src/main/java/com/seafile/seadroid2/ui/dialog_fragment/SignOutDialogFragment.java:7: error: package com.google.firebase.analytics does not exist
import com.google.firebase.analytics.FirebaseAnalytics;
                                    ^
/home/vagrant/build/com.seafile.seadroid2/app/src/main/java/com/seafile/seadroid2/ui/account/SeafileAuthenticatorActivity.java:28: error: package com.google.firebase.analytics does not exist
import com.google.firebase.analytics.FirebaseAnalytics;
                                    ^
/home/vagrant/build/com.seafile.seadroid2/app/src/main/java/com/seafile/seadroid2/ui/search/Search2Activity.java:35: error: package com.google.firebase.analytics does not exist
import com.google.firebase.analytics.FirebaseAnalytics;
                                    ^
warning: The following options were not recognized by any processor: '[workmanager.inline]'
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
7 errors
1 warning

> Task :app:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

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

licaon-kter commented 6 months ago

fixed in https://gitlab.com/fdroid/fdroiddata/-/merge_requests/14992

licaon-kter commented 2 months ago

more clean up needed: https://gitlab.com/fdroid/fdroiddata/-/jobs/7769041830

licaon-kter commented 2 months ago

@zhwanng ref: https://github.com/haiwen/seadroid/pull/1026 (https://github.com/haiwen/seadroid/blame/master/app/src/main/java/com/seafile/seadroid2/preferences/livedata/ParcelValueSettingLiveData.java#L9) any other lib could not have been used, only the GMS dependent one?

zhwanng commented 2 months ago

this can be modified, please wait for the PR to be submitted later

zhwanng commented 2 months ago

Does F-Droid automatically build and compile when a new merge is detected in the project? Or is it something else?

licaon-kter commented 2 months ago

app is on "autoupdate" see https://gitlab.com/fdroid/fdroiddata/-/blob/db13cd5c5518a0bb03105e8bfd2b8d4afbfb2d22/metadata/com.seafile.seadroid2.yml#L1347

so when a new tag with a higher version code is seen in https://github.com/haiwen/seadroid/tags then it will add the new version

if you want us to test something before tagging, ping us :wink:

linsui commented 1 week ago

https://gitlab.com/fdroid/checkupdates-bot-fdroiddata/-/jobs/8249517341 2 import of gms libs are added though they are not used at all. Could you please remove them?

zhwanng commented 1 week ago

yes, please wait a new tag.