notifee: F-droid build fails due to `core-xxx.jar` being removed during scan

Hi I Have an app that I’m trying to get released on f-droid, which requires all libraries to be fully open source. and it doesn’t allow pre-built libraries (jar files etc.) . currently my build fails due to core-202108261754.jar being removed during scan and remove phase of f-droid build, which seems to be provided as a prebuilt jar file instead of being built from source. here is the short log:

> Task :notifee_react-native:extractReleaseAnnotations FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':notifee_react-native:extractReleaseAnnotations'.
> Error while evaluating property 'hasAndroidAnnotations' of task ':notifee_react-native:extractReleaseAnnotations'
   > Could not resolve all artifacts for configuration ':notifee_react-native:releaseCompileClasspath'.
      > Failed to transform core-202108261754.jar (app.notifee:core:202108261754) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
         > Could not find core-202108261754.jar (app.notifee:core:202108261754).
           Searched in the following locations:
               file:/builds/meypod/fdroiddata/build/com.github.meypod.al_azan/node_modules/@notifee/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.jar

You can see the full build log here: https://gitlab.com/meypod/fdroiddata/-/jobs/2891520735

what is this core file and how can I resolve this issue ? do you have any suggestion ?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (21 by maintainers)

Most upvoted comments

Oh that’s great! That’s basically what I was thinking, and I’m glad it worked out for you. Always happy to see more open source stuff, and as mentioned I am a fan of F-Droid 😃

Cheers

What a great result! That’s cool - now f-droid-targeting apps have a maintained notification library, we’ll get the PR mainlined in time (post-vacations) I’m sure, thanks for putting it together

Thanks a lot! I think managed to fix it using the info you provided. for those who may encounter this issue later, here’s the steps I did:

  • Created a script in my repo’s root folder that clones only the needed files from the repo according to the package version, into the node_modules/@notifee/core folder. I run this before running a build to checkout the currently installed version.
  • added the following to my settings.gradle
include(":notifee_core")
project(":notifee_core").projectDir = file('../node_modules/@notifee/core/android')