Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The configuration was incorrect. The JitPack build still worked, but publishing to the Maven local repository using
./gradlew publishToMavenLocal
was broken (incorrect paths and metadata), and composite builds didn't get automatic dependency substitution: building other apps against a local version of Commons using./gradlew --include-build=../Commons ...
didn't work, and usingincludeBuild("../Commons")
in /settings.gradle.kts only worked with a manual substitution directive[1].Also move project identity values out of gradle/libs.versions.toml.
[1] https://github.com/FossifyOrg/Gallery/blob/692a5d08b30e7d4d374f53d7371781d05b482dc9/settings.gradle.kts#L26
What is it?
Description of the changes in your PR
Fix the Maven groupId (it should be "org.fossify", not "org.fossify.commons").
Set the Gradle project group. This allows automatic dependency substitution in composite builds (
--include-build=../Commons
). Also set the Gradle project version for consistency.Use defaults for MavenPublication. (It's no longer necessary to explicitly set the Maven groupId/artifactId/version because they default to the Gradle project group/name/version. This also fixes the artifactId, which was previously "release" but should be "commons".)
Avoid using libs.versions.toml for project identity. (That file is normally used for dependencies. Using it to set the project's own name and version is unusual. Also, it's confusing to have the "samples" project's appId and versionCode mixed together with the library things.)
Move android.namespace declaration up (it's more logical and matches the official examples).
Tweak the include() call in settings.gradle.kts (reorder so that "commons" is first because it's more important than "samples", and make colons consistent).
Fixes the following issue(s)
Acknowledgement