Closed licaon-kter closed 5 months ago
At the time of release, I had actually forgotten that this was probably going to be an issue for F-Droid.
Is there any course of action that can be taken by someone on the F-Droid team to work around this until the library is formally published?
Besides build from source?
Well, currently, there is no way to access the libraries other than to build them from source and then use gradle publishToMavenLocal
(reference). If the team is okay with doing that, then both of my modules should be able to build without any issues.
Yes, there are many recipes that use that.
Great! Could that approach then please be used for these two apps? It should only be necessary for as long as the libraries are not available in the Maven repo. That said, I have no idea how long it's going to be until the LSPosed team makes them available.
@licaon-kter Is there any further action required from me in order to resolve this?
Not for now, I tested yesterday but it run out of memory iirc, so I need to bump gradle stuff, will post back when I get further.
Excellent. Thank you!
Trying this recipe:
- versionName: 1.1.5
versionCode: 8
commit: 851e0bb814be649a28fcbb81aa4daa07e4cbcba2
subdir: app
sudo:
- apt-get update
- apt-get install -y openjdk-17-jdk-headless
- update-java-alternatives -a
gradle:
- yes
prebuild:
- echo -e "\norg.gradle.jvmargs=-Xmx4096m" >> ../gradle.properties
- echo -e "\norg.gradle.jvmargs=-XX:MaxHeapSize=2048m" >> ../gradle.properties
build:
- git clone https://github.com/libxposed/api
- pushd api
- git checkout -f 100
- gradle publishToMavenLocal
- popd
- git clone https://github.com/libxposed/service
- pushd api
- git checkout -f 100
- gradle publishToMavenLocal
- popd
...it takes a lot of time to build service, eg. I let it run overnight and 19h later it was not done :(
I let it run overnight and 19h later it was not done :(
That's alright! Are you trying it for Let Me Downgrade as well or just this one for now?
I'll be more specific, I'm stuck at building those two libxposed
Is it failing with an error?
If I don't add those two entries to gradle,properties
it fails with
...
> Task :api:javaDocReleaseGeneration
Initializing plugins
Dokka is performing: documentation for :api
Validity check
Creating documentation models
> Task :api:bundleReleaseAar
> Task :api:sourceReleaseJar
> Task :api:generatePomFileForApiPublication
WARN: The registry key 'java.correct.class.type.by.place.resolve.scope' accessed, but not loaded yet
WARN: The registry key 'java.correct.class.type.by.place.resolve.scope' accessed, but not loaded yet
WARN: The registry key 'java.correct.class.type.by.place.resolve.scope' accessed, but not loaded yet
> Task :api:javaDocReleaseGeneration
> Task :api:javaDocReleaseGeneration
Transforming documentation model before merging
Merging documentation models
Transforming documentation model after merging
Creating pages
Transforming pages
Rendering
Initializing plugins
Dokka is performing: documentation for :api
Validity check
Creating documentation models
The Daemon will expire after the build after running out of JVM Metaspace.
The project memory settings are likely not configured or are configured to an insufficient value.
The daemon will restart for the next build, which may increase subsequent build times.
These settings can be adjusted by setting 'org.gradle.jvmargs' in 'gradle.properties'.
The currently configured max heap space is '512 MiB' and the configured max metaspace is '256 MiB'.
For more information on how to set these values, visit the user guide at https://docs.gradle.org/8.0.1/userguide/build_environment.html#configuring_jvm_memory
To disable this warning, set 'org.gradle.daemon.performance.disable-logging=true'.
> Task :api:javaDocReleaseGeneration
> Task :api:javaDocReleaseGeneration FAILED
20 actionable tasks: 20 executed
FAILURE: Build failed with an exception.
* What went wrong:
Self-suppression not permitted
> Metaspace
...while trying to compile libxposed/api
If I add those two... it might never finish, eg. in one test after 19h it was sitting in the same place, iirc, for :api:javaDocReleaseGeneration
Can we skip this Docs generation thing?
Can we skip this Docs generation thing?
Certainly! The docs generation only has any value for development work. There's no reason to bother with it for build automation.
Now detail how :smile:
Unfortunately, I have no idea. 🙃
That said, StackOverflow is telling me that this might work.
@licaon-kter Any luck with this? I have unfortunately not had time to investigate further.
Nope, I have no clue of what to try next.
I'm not sure I fully understand what the issue is. Is the build system running out of resources?
Yes, first try fails with an ever unclear "Metaspace". Meta the space what? Ah, gotta bump resources? Sure... bump them, retry, 19h later...compile still ongoing...maybe...or stuck...no idea.
The recipe is above, try locally, clone, checkout, gradle...
How much RAM is allocated to the build process? A quick Google search about metaspace is showing me stuff about Java running out of memory.
Dunno how much, see jvmargs above for what I've tried, need more? How much?
I really don't know what to suggest setting the memory allocation to since I didn't have any issues building on my machine, but I'd probably try 8192mb for both of them.
...as libxposed not yet in (trusted) maven repos
ref: https://gitlab.com/fdroid/fdroiddata/-/jobs/5268128216#L511
ref: https://github.com/LSPosed/LSPosed/wiki/Develop-Xposed-Modules-Using-Modern-Xposed-API/a7f346f7ec01ea698e1b187fc20de5fc727b0d09#early-access
/LE: https://gitlab.com/fdroid/fdroiddata/-/commit/c2bcebc2e6eee7d444da8afc49f442007b95f1bf fyi