Advanced package ID extraction with F-Droid build server

I am trying to integrate the F-Droid build server into a CI pipeline for an app.

I have done this successfully for another app by following these steps:

  • drop the build recipe into the root dir of the source tree, named .fdroid.yml
  • add a CI job running on the ci-images-client image which installs a bunch of dependencies and eventually runs fdroid build without specifying a package ID

Since there is no way to extract the package name from the build recipe (in fdroiddata it would be part of the filename, but not in this setup), F-Droid needs to analyze the sources to determine the package name.

For my first app this works: since it build with gradle, F-Droid analyzes build.gradle in the root of the source tree to get the manifest path, and then extracts the package name from the manifest,

For the second app, things are a bit trickier since it involves a lot of native code built outside of gradle. The root dir has a file named build.gradle, which is essentially a NOP (no operation), but settings.gradle includes another build.gradle residing in a subdir. The manifest is only referenced in the build.gradle which resides in the subdir. However, F-Droid does not resolve this inclusion and therefore fails to determine the package name.

Is there any way I can direct F-Droid to the package name, or specify it explicitly in some way?

I have tried adding subdir: path/to/subdir to the build recipe and cding back up at the beginning of the prebuild and build sections, but that resulted in other weird errors appearing (like the build script no liner finding the C compiler, which works just fine otherwise).

What gives? Should I file a bug for fdroidserver that gradle includes should be analyzed and followed? Or is there any other solution?

it’s a common mistake, I make the same mistake. It’s not fair to us. But now I have fixed the error.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.