99keshav99 / CaptureSposed

Xposed module that effectively disables the newly introduced screenshot detection API in Android 14
GNU Affero General Public License v3.0
89 stars 5 forks source link

Failed to build from source #57

Closed IzzySoft closed 2 weeks ago

IzzySoft commented 2 weeks ago

I was just checking if the APK can be built reproducible – but the build failed:

FAILURE: Build failed with an exception.

* What went wrong:
Configuration cache state could not be cached: field `compileTimeDependencies` of task `:app:dataBindingMergeDependencyArtifactsRelease` of type `com.android.build.gradle.internal.tasks.databinding.DataBindingMergeDependencyArtifactsTask`: error writing value of type 'org.gradle.api.internal.artifacts.configurations.ResolutionBackedFileCollection'
> Could not resolve all files for configuration ':app:releaseCompileClasspath'.
   > Could not find io.github.libxposed:api:100.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/io/github/libxposed/api/100/api-100.pom
       - https://repo.maven.apache.org/maven2/io/github/libxposed/api/100/api-100.pom
       - https://jitpack.io/io/github/libxposed/api/100/api-100.pom
       - file:/build/.m2/repository/io/github/libxposed/api/100/api-100.pom
     Required by:
         project :app
   > Could not find io.github.libxposed:service:100-1.0.0.
     Required by:
         project :app

Note that I'm no Android dev but just rely on the corresponding framework here. From the error message I conclude you might have forgotten to check something in (mavenLocal seems to support this) – but of course, not being a dev I cannot tell for sure. Is this something on your end you could fix?

99keshav99 commented 2 weeks ago

To fix this build issue, please compile and push both libxposed/api and libxposed/service to your local Maven repository using the publishToMavenLocal task. This should resolve the missing dependencies and allow the build to proceed successfully. (https://github.com/libxposed/service/issues/4#issuecomment-1454364434)

Is this something on your end you could fix?

Unfortunately, we cannot address this from our end. Please refer to this comment for more information.

IzzySoft commented 2 weeks ago

Ah, I see, thanks! That goes quite beyond my capabilities (build & RB test happen in a disposable container; it would probably be possible to add that to the build script – but not being an Android dev myself, I have no idea how to achieve this; still learning, but also still on novice level). Thus RB-test needs to wait until either those libraries became available in public Maven (I welcome a ping once you switched to that; the linked comment is from last year, so there's hope), I achieve the needed knowledge myself (can take a while), or I get "outside help" implementing the local Maven (might take a while as well).

Luckily nothing crucial, so no hurry.

DavidBerdik commented 2 weeks ago

I am not sure how closely your build system matches F-Droid, but is it possible that the conversation in the GitLab issue for getting CaptureSposed on F-Droid would be useful?

https://gitlab.com/fdroid/rfp/-/issues/2755

IzzySoft commented 2 weeks ago

@DavidBerdik Hey! Took me a little to "convert" that, but I've managed to build, thanks! And while the framework I use is a bit different, I've managed a reproducible build even (and learned some new stuff on the way), wonderful!

DavidBerdik commented 2 weeks ago

@IzzySoft Great! Thanks for the work you do! 😁