Closed tom93 closed 2 months ago
@tom93 check settings.gradle.kts in the the gallery.
Thanks. I tried it on File-Manager but got some errors (e.g. in ChangeViewTypeDialog.kt, useForThisFolderDivider had type DividerBinding instead of View), sounds very similar to the binding issues you ran into in https://github.com/SimpleMobileTools/Simple-Gallery/pull/2967. I don't have a clue why, do you have any insights? (Since the Maven local repository works, my take is that it's not worth changing the code to make includeBuild() work unless includeBuild() is uncovering an actual bug.)
And is it okay if I still create a PR with my patch from above? The existing Maven configuration seem plain wrong.
got some errors (e.g. in ChangeViewTypeDialog.kt, useForThisFolderDivider had type DividerBinding instead of View), sounds very similar to the binding issues you ran into in https://github.com/SimpleMobileTools/Simple-Gallery/pull/2967. I don't have a clue why, do you have any insights?
Yep, it's the same issue. I never investigated it, it probably has something to do with how bindings are generated.
is it okay if I still create a PR with my patch from above?
Sure but please do test the Jitpack build once, you can trigger a build at https://jitpack.io/#org.fossify/commons or https://jitpack.io/#tom93/commons in your case.
@naveensingh I created a PR (FossifyOrg/Commons#46) with an improved version of the patch from above that also fixes composite builds (and moves the values out of gradle/libs.versions.toml). I'm not sure how to trigger the JitPack build (it asks me to log in), can you please check for me? The commit is f0d9cd9f6f
.
Aside: I found and wrote a patch for a serious issue in the Messages app relating to deletion, please give that priority over my other PRs!
@tom93 It works™
Yay, thanks!
Checklist
Affected Android/Custom ROM version
N/A
Affected device model
N/A
How did you install the apps?
None
Which apps are affected?
No response
Steps to reproduce the bug
When I try to build one of the apps against a local version of Commons (using Maven's local repository) I run into errors. I think it's due to an issue with the configuration of the MavenPublication task, but maybe I'm just doing something wrong -- how do you normally build the apps against a locally-modified version of Commons?
Here are the steps I've been using:
./gradlew publishToMavenLocal
commons = "..."
line to the same version. Also edit settings.gradle.kts and insertmavenLocal()
at the top of the dependencyResolutionManagement section../gradlew assembleDebug
Expected behavior
It should succeed.
Actual behavior
It fails with:
If I add --debug then I get:
Screenshots/Screen recordings
No response
Additional information
When I look in ~/.m2/repository, I the .pom file is actually in ~/.m2/repository/org/fossify/commons/release/1.0.0-local/release-1.0.0-local.pom and has the following contents:
For comparison, https://jitpack.io/org/fossify/commons/b34aef8104/commons-b34aef8104.pom has the following contents (note that different groupId and artifactId):
This makes me think that the Maven configuration is incorrect. The following patch fixes the problem for me (but I have no idea if it will cause problems with jitpack):
I had to change how the namespace is set in commons/build.gradle.kts because it is no longer equal to the groupId. I'm not sure what the best practice is with respect to hard-coding (like I did for the namespace) or using a string from gradle/libs.versions.toml (like in MavenPublication); personally I think gradle/libs.versions.toml somewhat overkill and not really the right place for these non-dependency constants.