Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JitPack's publishToMavenLocal stopped working after upgrading to Gradle 8.x #177

Closed
jo-elimu opened this issue Feb 24, 2025 · 3 comments · Fixed by #178 or #179
Closed

JitPack's publishToMavenLocal stopped working after upgrading to Gradle 8.x #177

jo-elimu opened this issue Feb 24, 2025 · 3 comments · Fixed by #178 or #179
Assignees

Comments

@jo-elimu
Copy link
Member

Before: https://jitpack.io/com/github/elimu-ai/analytics/3.1.21/build.log

Tasks: publishToMavenLocal,
Running: ./gradlew clean -Pgroup=com.github.elimu-ai -Pversion=3.1.21 -xtest -xlint assemble publishToMavenLocal

> Configure project :utils
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33
.
.
.
✅ Build artifacts:
com.github.elimu-ai:analytics:3.1.21

Files: 
com/github/elimu-ai/analytics/3.1.21
com/github/elimu-ai/analytics/3.1.21/analytics-3.1.21-sources.jar
com/github/elimu-ai/analytics/3.1.21/analytics-3.1.21.aar
com/github/elimu-ai/analytics/3.1.21/analytics-3.1.21.pom
com/github/elimu-ai/analytics/3.1.21/analytics-3.1.21.pom.md5
com/github/elimu-ai/analytics/3.1.21/analytics-3.1.21.pom.sha1
com/github/elimu-ai/analytics/3.1.21/build.log

After: https://jitpack.io/com/github/elimu-ai/analytics/3.1.22/build.log

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':utils:publishUtilsPublicationToMavenLocal' (type 'PublishToMavenLocal').
  - Gradle detected a problem with the following location: '/home/jitpack/build/utils/build/outputs/aar/utils-3.1.22-release.aar'.
    
    Reason: Task ':utils:publishUtilsPublicationToMavenLocal' uses this output of task ':utils:bundleReleaseAar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':utils:bundleReleaseAar' as an input of ':utils:publishUtilsPublicationToMavenLocal'.
      2. Declare an explicit dependency on ':utils:bundleReleaseAar' from ':utils:publishUtilsPublicationToMavenLocal' using Task#dependsOn.
      3. Declare an explicit dependency on ':utils:bundleReleaseAar' from ':utils:publishUtilsPublicationToMavenLocal' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 2m 51s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Publication: ai.elimu.analytics:utils:3.1.22
Build tool exit code: 1
2025-02-24T07:15:43.036049822Z
Exit code: 1

⚠️ ERROR: No build artifacts found
@jo-elimu
Copy link
Member Author

Will setting android.disableAutomaticComponentCreation=false in gradle.properties solve the issue?

jo-elimu added a commit that referenced this issue Feb 24, 2025
jo-elimu added a commit that referenced this issue Feb 24, 2025
@jo-elimu jo-elimu linked a pull request Feb 24, 2025 that will close this issue
@jo-elimu
Copy link
Member Author

https://jitpack.io/com/github/elimu-ai/analytics/3.1.25/build.log

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':utils:publishReleasePublicationToMavenLocal' (type 'PublishToMavenLocal').
  - Gradle detected a problem with the following location: '/home/jitpack/build/utils/build/outputs/aar/utils-3.1.25-release.aar'.
    
    Reason: Task ':utils:publishReleasePublicationToMavenLocal' uses this output of task ':utils:bundleReleaseAar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':utils:bundleReleaseAar' as an input of ':utils:publishReleasePublicationToMavenLocal'.
      2. Declare an explicit dependency on ':utils:bundleReleaseAar' from ':utils:publishReleasePublicationToMavenLocal' using Task#dependsOn.
      3. Declare an explicit dependency on ':utils:bundleReleaseAar' from ':utils:publishReleasePublicationToMavenLocal' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 1m 3s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Publication: ai.elimu.analytics:utils:3.1.25
Build tool exit code: 1
2025-02-24T12:18:34.304522444Z
Exit code: 1

⚠️ ERROR: No build artifacts found

@jo-elimu jo-elimu reopened this Feb 24, 2025
jo-elimu added a commit that referenced this issue Feb 24, 2025
jo-elimu added a commit that referenced this issue Feb 24, 2025
@jo-elimu
Copy link
Member Author

@jo-elimu jo-elimu self-assigned this Feb 24, 2025
@jo-elimu jo-elimu mentioned this issue Feb 24, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant