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 #18

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

neotheprogramist
Copy link
Contributor

@neotheprogramist neotheprogramist commented Nov 21, 2023

fixes visoftsolutions#2

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.

Signed-off-by: Neo <neotheprogramist@proton.me>
Copy link

  • I thought about the changelog.

@matkt matkt merged commit a6a020f into hyperledger:main Nov 22, 2023
5 checks passed
dragan2234 pushed a commit to dragan2234/besu-verkle-trie that referenced this pull request Jan 22, 2024
Signed-off-by: Neo <neotheprogramist@proton.me>
Signed-off-by: Dragan Pilipovic <draganpilipovic1997bp@gmail.com>
dragan2234 pushed a commit to dragan2234/besu-verkle-trie that referenced this pull request Jan 22, 2024
Signed-off-by: Neo <neotheprogramist@proton.me>
Signed-off-by: Dragan Pilipovic <draganpilipovic1997bp@gmail.com>
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.

Fix classifier Property Issue in Gradle Build
2 participants