nwrkbiz / android-xserver

Maintaining the original project to make it work again with new Android versions.
MIT License
167 stars 18 forks source link

Can fastlane be moved into 'demo' project? #19

Closed IriaSomobu closed 3 years ago

IriaSomobu commented 3 years ago

If I get it right, fastlane is related to 'demo' project only, so it is better to move it there.

Is it possible to do so?

@IzzySoft

nwrkbiz commented 3 years ago

I agree, this would be much neater. But I am afraid this is currently not supported by F-Droid: https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/

This structure must be placed at one of the following locations from the repository’s root:

* metadata/
* fastlane/metadata/android/

Note that placing the structure anywhere else, like in the gradle module’s root, won’t work.

Here the F-Droid issue about this problem: https://gitlab.com/fdroid/fdroidserver/-/issues/829

nwrkbiz commented 3 years ago

This should be done as soon it is possible with F-Droid. (May need a matching PR/MR to https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/au.com.darkside.xdemo.yml).

For now I can suggest to prepare for this step by working around this problem with a symlink.

IzzySoft commented 3 years ago

Fastlane located at different places is currently being worked on at F-Droid. Some few are already supported, see here for progress. What already seems to work (and might meet your needs) is /src/<buildFlavor>/fastlane/metadata/android/ – so moving the fastlane directory to demo/src/main/fastlane should work. Adjustments to your YAML file at fdroiddata should not be needed.

To try that without risk, you could start by adding demo/src/main/fastlane/metadata/android/de/short_description.txt with the content leichtgewichtiger Android X11 X-Server ("light-weight Android X11 X-Server") and, after the next release shows up at F-Droid, see if that's there. If it works out as expected, the current fastlane structure could be moved over with the next-to-next release then.

nwrkbiz commented 3 years ago

@IzzySoft Thanks for the info. If it does not work out this way, I'll add a symlink to root that points to: demo/src/main/fastlane/metadata/android/de/

IzzySoft commented 3 years ago

If having a symlink there is OK (it should work with F-Droid, and for my repo I could simply point to the real location – if I shall still keep it in mine now that it made it to F-Droid.org that is?), why not keep the original there? But yes, let's see – maybe it simply works without the symlink.

Make sure to let me know if the entire structure is available at the new location, and if I shall keep your app in my repo – usually I remove apps from mine about a week after they made it to F-Droid.org (some pros and cons are outlined in my repo's FAQ) unless requested otherwise.

nwrkbiz commented 3 years ago

If having a symlink there is OK (it should work with F-Droid, and for my repo I could simply point to the real location – if I shall still keep it in mine now that it made it to F-Droid.org that is?), why not keep the original there? But yes, let's see – maybe it simply works without the symlink.

As preperation. When full support is added the I can simply remove the symlink.

Make sure to let me know if the entire structure is available at the new location, and if I shall keep your app in my repo – usually I remove apps from mine about a week after they made it to F-Droid.org (some pros and cons are outlined in my repo's FAQ) unless requested otherwise.

I moved it to demo/src/main/fastlane/metadata/android/de/ in d370b41. As you wish, I see no downsides with the app being available from different sources.

IzzySoft commented 3 years ago

When full support is added the I can simply remove the symlink.

And how do you find out when that will be? Which is why I proposed just adding a de summary in the new location. The current en-US fits both languages fine, so if the new one is not detected it's no problem. Once the new one is detected you know that place is "fully supported" and can move the entire tree to the new location. Now with the symlink you will only find out the hard way: remove the symlink. If it didn't work, your app has no longer any description until the next release. Bad idea if you ask me :wink:

nwrkbiz commented 3 years ago

@IzzySoft Ok, I think I got you now :) I symlinked only en-US to root now. If the german description appears on F-Droid within the next release, we know that it did work out and I can remove the folder.

nwrkbiz commented 3 years ago

FYI: Seems like it did not work out.

https://f-droid.org/en/packages/au.com.darkside.xdemo/ <-- Contains the newly added "light-weight" https://f-droid.org/de/packages/au.com.darkside.xdemo/ <-- Is still english

IzzySoft commented 3 years ago

Yes, and? F-Droid has v1.29 – the new Fastlane became available with…? 1.30. So it cannot yet be visible. Fastlane is always taken from the same tag the app is built from. So you've got to postpone your check until v1.30 arrived at F-Droid :wink:

nwrkbiz commented 3 years ago

Yes, and? F-Droid has v1.29 – the new Fastlane became available with…? 1.30. So it cannot yet be visible. Fastlane is always taken from the same tag the app is built from. So you've got to postpone your check until v1.30 arrived at F-Droid

Hmm, but 1.29 fastlane has no "light-weight": https://github.com/nwrkbiz/android-xserver/blob/b7fcf6cbe4e6579c4a10a0e44b91d9dfeb15c76f/fastlane/metadata/android/en-US/short_description.txt

EDIT: Yah, the build failed because of the WM binary, I was afraid that this will happen when moving them from the assets folder to jniLibs. Seems like I really have to write the receipe now, meh.

But still, what is presented now on the F-Droid homepage is the fastlane structure from the 1.30 tag and it misses the german translation.

IzzySoft commented 3 years ago

What a mess… Wait, I guess I spotted the culprit: it should be /src/<buildFlavor>/fastlane/metadata/android/. You have no flavor named "main". You have no flavor at all. So it's either:

No idea what else. I suspect it's the first bullet-point. Let me quote the relevant piece of code from fdroidserver:

    sourcedirs = glob.glob(os.path.join('build', '[A-Za-z]*', 'src', '[A-Za-z]*', 'fastlane', 'metadata', 'android', '[a-z][a-z]*'))
    sourcedirs += glob.glob(os.path.join('build', '[A-Za-z]*', 'fastlane', 'metadata', 'android', '[a-z][a-z]*'))
    sourcedirs += glob.glob(os.path.join('build', '[A-Za-z]*', 'metadata', '[a-z][a-z]*'))
    sourcedirs += glob.glob(os.path.join('metadata', '[A-Za-z]*', '[a-z][a-z]*'))

I'm always at a loss interpreting those lines. Let me grab from a build log what the structure in there might be:

Checking build/com.superproductivity.superproductivity/app/build/outputs/apk/fdroid/release/app-fdroid-release-unsigned.apk

OK, so in our code snippet, the first '[A-Za-z]*' would be the packageName, then comes the "unpacked code of the app" (more specific, the contents of what subdir: from the build block points to). Hm. Then the second '[A-Za-z]*' in the first line should have matched "main":

build/au.com.darkside.xdemo/src/demo/fastlane/..

Well, out of ideas… But maybe with the above, you can spot something in the build logs to solve the riddle…

nwrkbiz commented 3 years ago

Thanks a lot, i will tinker around within the next tags.

IzzySoft commented 3 years ago

Looking forward to that. Please keep me updated on findings, as this will certainly not be the last time I'm confronted with the topic.