Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BetterBatteryStats on Fdroid / Gradle based build #761

Closed
Bubu opened this issue Feb 8, 2016 · 16 comments
Closed

BetterBatteryStats on Fdroid / Gradle based build #761

Bubu opened this issue Feb 8, 2016 · 16 comments

Comments

@Bubu
Copy link

Bubu commented Feb 8, 2016

I wanted to bring back BetterBatteryStats back to Fdroid as there is currently only a seriously out of date version available.

I struggled with the current ant based build system and was not able to successfully build BBS that way.
However I was able to convert the build to using gradle without too much effort.

Now integrating this into the Fdroid's automated build system poses a few challenges and I'd like to ask your opinion on how to proceed.

  1. I can provide grade build files which you can merge additionally to the current system. This would have to be done for both BetterBatteryStats and AndroidCommon.
  2. You switch to gradle altogether. I don't know how disruptive that would be for you, but gradle is clearly the more modern and more advanced build system. I can provide a pull request for this too.
  3. I work from a personal fork on github where I can adapt the project structure myself. Fdroid builds from that fork but I would have to manually merge every update back into that fork.

I think all three solutions (but probably mostly 1. and 2.) improve how easy it is for people to not only look at the source but download and build it themselves and maybe sent back improvements to you.

@asksven
Copy link
Owner

asksven commented Feb 10, 2016

Please not that while the source code is open source the artwork and the name are not.
Regarding porting bbs to android studio: this is something that I plan to do but I currently lack time. Did the process - including libs - go straight forward or did it require some major stunts / refactoring?

@asksven asksven closed this as completed Feb 10, 2016
@Bubu
Copy link
Author

Bubu commented Feb 10, 2016

No major hiccups. No code refactoring required. You can either restructure your repository to conform to the gradle standards. Or you can leave it as it is and have the non default setup in your build.gradle.

The AndroidManifest.xml needs minor adjustments because of a stricter merging process.
As for the libraries: AndroidCommon and LocalePluginLib need exactly the same treatment. All other libraries can just be included from jcenter/maven with gradle. (Excluding RootTools but you can just keep the .jar file you already have.)

Should I open a PR so you can take a look at the new structure?

@Bubu
Copy link
Author

Bubu commented Feb 10, 2016

Regarding fdroid and licenses: Would you be interested in making this app available on fdroid besides the xda-forum and google play?
I think fdroid is a better alternative to manually distributing apks:
There are update notifications and it's easy to verify that the distributed app corresponds to the available source code. Both are important security aspects.

Regarding the artwork license, I think you are talking about the icon and three widget previews or did I miss anything?
It is not a hard requirement that these are under a free license (see F-Droid inclusion policy) as long as you allow the distribution with your app.

@asksven
Copy link
Owner

asksven commented Feb 12, 2016

I did a quick conversion to android studio yesterday. I don't really like the structure created by the wizard and may rebuild the project from scratch one day.
Right I am stuck at one point that you may help me with:
during conversion AndroidCommon is copied into the project as a module and that is a no-go as I don't want to have multiple copies of a lib other projects depend on. What I need is a reference to an external project so I migrated AndroidCommon first, migrated bbs second, removed the module and the dependencies and added the dependency to the external project back in. So far so good but now I am confronted with obscure gradle errors on AS 2.0B3 and Google is of no help. Does your project setup handle this or did you stick with the module with a copy of AndroidCommon?

@Bubu
Copy link
Author

Bubu commented Feb 12, 2016

I added AndroidCommon as a git submodule. I don't know if you can tell gradle to look outside the project root. But symlinks definitely work

Otherwise what gradle errors are you getting? I had to do something special with/ because of the jackson dependency.

On 12 February 2016 17:43:50 CET, asksven notifications@github.com wrote:

I did a quick conversion to android studio yesterday. I don't really
like the structure created by the wizard and may rebuild the project
from scratch one day.
Right I am stuck at one point that you may help me with:
during conversion AndroidCommon is copied into the project as a module
and that is a no-go as I don't want to have multiple copies of a lib
other projects depend on. What I need is a reference to an external
project so I migrated AndroidCommon first, migrated bbs second, removed
the module and the dependencies and added the dependency to the
external project back in. So far so good but now I am confronted with
obscure gradle errors on AS 2.0B3 and Google is of no help. Does your
project setup handle this or did you stick with the module with a copy
of AndroidCommon?


Reply to this email directly or view it on GitHub:
#761 (comment)

@asksven
Copy link
Owner

asksven commented Feb 13, 2016

build.gradle
dependencies {
compile project(':androidCommon')

settings.gradle
include ':androidCommon'
project(':androidCommon').projectDir = new File(settingsDir, '../AndroidCommon')

error:
cannot evaluate module androidCommon: configuration with name 'default' not found

@Bubu
Copy link
Author

Bubu commented Feb 13, 2016

Seems like he can't find the build.gradle file from AndroidCommon.
I found that: http://stackoverflow.com/a/19303545/1634837
The Syntax used there is a bit different.

@Bubu
Copy link
Author

Bubu commented Feb 22, 2016

Any progress?
Btw. you haven't commented on the FDroid situation? Can you share your thoughts on that?

@jagguli
Copy link

jagguli commented Apr 13, 2017

Is this going on fdroid? Correct me if I'm mistaken but google play is a binary repo, where as fdroid builds from repo source?

@Perflyst
Copy link

Perflyst commented Jun 1, 2018

Any updates?

@dimqua
Copy link

dimqua commented Nov 11, 2018

No? :-/

@ildar
Copy link

ildar commented Dec 9, 2019 via email

@licaon-kter
Copy link

I am sorry but I am not the maintainer of the F-Droid entry and this entry was added without my consent.

It's true that F-Droid goes the extra mile and asks for the developer to consent even if the license permits it, yes.
Not sure how BBS was treated back in 2013 when included though.

If you want to stay current on BBS development I recommend google play of XDA since I maintain these sources

As said before since there are no Tags it's hard for F-Droid to detect new versions, else it would be up to date. Eg. we are manually updating it for the last 10 years already, like I just did: https://gitlab.com/fdroid/fdroiddata/-/commit/676958e15273f438790ad6f6672c0a0c29b3b336

I have moved to branches instead of tags a while ago

Looks like that got obsolete too in the meantime.

Anyway, what would it take for you @asksven to consent with the inclusion? (no, we can't pickup APKs from XDA 😄)

@asksven
Copy link
Owner

asksven commented Jun 29, 2023 via email

@licaon-kter
Copy link

I do not appreciate that the google play entry was copied 1:1 to F-Droid

You mean description? I guess it was copied to have it as correct as possible, it's way behind now.

what keys has it signed with

Now it is signed with F-Droid's one.

Is the app build reproducible? If yes, we might be able to switch it to your keys, but that means you'll need to host the APKs (eg. here https://github.com/asksven/BetterBatteryStats/tags or elsewhere)

how is the supply chain guaranteed (you may have noticed that my commits are signed with GPG, what about the integrity of the end-product?

@eighthave ping and https://gitlab.com/fdroid/wiki/-/wikis/FAQ#how-exactly-does-the-building-process-work

Who is the person for me to contact if there are issues addressed to me and where the build-process is at fault?

https://gitlab.com/fdroid/fdroiddata/-/issues/

We need an agreement about the use of the brand and the icon: these are excluded from the apache license and so not open source

We can flag them as "NonFreeAssets", but indeed F-Droid might need your explicit agreement. Else someone would need to fork the app and replace them.

what do we need to agree upon to ensure a hand-over that has traceability: I am happy to tag if you provide me visibility into the build process and chain to release

Not sure what you want to see, that's not in https://gitlab.com/fdroid/fdroiddata/-/commits/master?ref_type=heads and https://monitor.f-droid.org/builds already

I’d be happy to publish to f-droid instead of the current indirect and obscure (to me) way of handling

No, F-Droid needs to build it itself, but as said above if the app is build reproducible then F-Droid just verifies it and serves your signed APK.

...avoid breaking the experience of any user having to un-install

On a signer switch there's no upgrade path without the user un/re/installing :(

@eighthave
Copy link

eighthave commented Jul 4, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants