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

Fix classifier Property Issue in Gradle Build #13

Conversation

neotheprogramist
Copy link
Collaborator

Description

This PR addresses a build failure in the besu-verkle-trie project while executing the gradle command. The error was caused by the use of the deprecated classifier property in the build.gradle file.

Error Details

Running the gradle command resulted in the following error:

$ gradle

FAILURE: Build failed with an exception.

* Where:
Build file './besu-verkle-trie/build.gradle' line: 111

* What went wrong:
A problem occurred evaluating root project 'besu-verkle-trie'.
> Could not set unknown property 'classifier' for task ':sourcesJar' of type org.gradle.api.tasks.bundling.Jar.
...

Cause

The issue was due to the use of the classifier key, which has been deprecated. The problematic code snippet was:

  task sourcesJar(type: Jar, dependsOn: classes) {
    archiveBaseName = 'besu-verkle.trie'
    classifier = 'sources'
    from sourceSets.main.allSource
  }

  task javadocJar(type: Jar, dependsOn: javadoc) {
    archiveBaseName = 'besu-verkle.trie'
    classifier = 'javadoc'
    from javadoc.destinationDir
  }

Resolution

The classifier property has been replaced with archiveClassifier to maintain compatibility with the latest version of Gradle. The updated code is as follows:

  task sourcesJar(type: Jar, dependsOn: classes) {
    archiveBaseName = 'besu-verkle.trie'
    archiveClassifier = 'sources'
    from sourceSets.main.allSource
  }

  task javadocJar(type: Jar, dependsOn: javadoc) {
    archiveBaseName = 'besu-verkle.trie'
    archiveClassifier = 'javadoc'
    from javadoc.destinationDir
  }

Impact

This change ensures compatibility with Gradle 9.0 and resolves the build failure issue.

Copy link
Collaborator

@matkt matkt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neotheprogramist neotheprogramist force-pushed the compatibility-with-latest-gradle branch from b833428 to 3e55d9d Compare November 21, 2023 09:44
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 this pull request may close these issues.

2 participants