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

Issue 6981: Add publish maven when gradle version is greater or equal than 7.0 #6982

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

davideduma
Copy link

Signed-off-by: davideduma david24eduma@gmail.com

Tags:
@JhoanAlvear
@davideduma

Change log description
MavenDeployment deployment is deprecated.
Update come from: https://docs.gradle.org/current/userguide/publishing_maven.html

image

Purpose of the change
ISSUE: #6981

What the code does
Reemplace el código antiguo para actualizar el script. Sugerir documentos gradle.
https://docs.gradle.org/current/userguide/publishing_maven.html

How to verify it
Description about how to verify on the link below : #6981

david-marquez-v and others added 2 commits December 28, 2022 11:51
Signed-off-by: davideduma <david24eduma@gmail.com>
Add plublish maven when gradle version is greater or equal than 7.0
@abhinb abhinb self-requested a review January 5, 2023 04:19
@abhinb
Copy link
Contributor

abhinb commented Jan 5, 2023

@davideduma
Thanks for pointing this out. Just a question on the change. What i understand from the referred link in your PR is that from Gradle 7.0 onwards, we need to move to using "maven-publish" plugin right? I didnt see that part in the PR raised.

@@ -60,12 +60,21 @@ plugins.withId('maven') {
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

we need to be moving to "maven-publish" plugin from Gradle 7 onwards right?(dont see that)

Copy link
Author

Choose a reason for hiding this comment

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

Yes, there is. If you use version gradle is greater or equal than 7.0 then you need uncomment the code:

image

@davideduma
Copy link
Author

@davideduma Gracias por señalar esto. Solo una pregunta sobre el cambio. Lo que entiendo del enlace referido en su PR es que a partir de Gradle 7.0 en adelante, debemos pasar a usar el complemento "maven-publish", ¿verdad? No vi esa parte en el PR levantado.

Yes thats right. Here is code:

image

@codecov
Copy link

codecov bot commented Jan 7, 2023

Codecov Report

Base: 86.36% // Head: 86.38% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (8122b21) compared to base (3470913).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6982      +/-   ##
============================================
+ Coverage     86.36%   86.38%   +0.01%     
- Complexity    15927    15973      +46     
============================================
  Files          1027     1029       +2     
  Lines         59330    59368      +38     
  Branches       6001     6003       +2     
============================================
+ Hits          51242    51283      +41     
+ Misses         4954     4951       -3     
  Partials       3134     3134              
Impacted Files Coverage Δ
...ravega/client/control/impl/CancellableRequest.java 78.57% <0.00%> (-10.72%) ⬇️
...o/pravega/client/stream/impl/ReaderGroupState.java 92.58% <0.00%> (-1.81%) ⬇️
...a/io/pravega/controller/metrics/StreamMetrics.java 80.87% <0.00%> (-1.64%) ⬇️
...io/pravega/common/concurrent/DelayedProcessor.java 89.02% <0.00%> (-1.22%) ⬇️
...client/control/impl/ControllerResolverFactory.java 82.85% <0.00%> (-0.96%) ⬇️
...o/pravega/controller/server/ControllerService.java 85.32% <0.00%> (-0.46%) ⬇️
.../server/attributes/SegmentAttributeBTreeIndex.java 89.89% <0.00%> (-0.28%) ⬇️
...ga/controller/task/Stream/StreamMetadataTasks.java 86.21% <0.00%> (-0.22%) ⬇️
...i/admin/dataRecovery/DurableLogInspectCommand.java 83.33% <0.00%> (ø)
...ravega/segmentstore/server/host/StorageLoader.java 100.00% <0.00%> (ø)
... and 13 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

gradle/maven.gradle Outdated Show resolved Hide resolved
@abhinb
Copy link
Contributor

abhinb commented Jan 10, 2023

@davideduma
sure. Is this PR about handling the "signing" part when we move to Gradle 7.0 or about moving to Gradle 7.0 itself?

Based on the referenced issue #6981 and 'maven-publish' links in the description of PR i am assuming its the latter.

Locally when i move to Gradle 7.0(with your signing change), the first thing it fails at is gradle/gradle.java ( line 21) because 'maven' plugin is moved to 'maven-publish' from Gradle 7.0 onwards.

If this PR is not about Gradle 7.0 changes, i believe there are many other changes we would need to do like these removals etc.
https://docs.gradle.org/current/userguide/upgrading_version_6.html#sec:configuration_removal
as part of moving to Gradle 7.0, post which we can take this change.

david-marquez-v and others added 2 commits January 10, 2023 10:14
Signed-off-by: davideduma <david24eduma@gmail.com>
@davideduma
Copy link
Author

@davideduma Por supuesto. ¿Se trata de manejar la parte de "firma" cuando pasamos a Gradle 7.0 o de pasar a Gradle 7.0 en sí?

Basado en el número de referencia # 6981 y los enlaces 'maven-publish' en la descripción de PR, asumo que es lo último.

Localmente, cuando me muevo a Gradle 7.0 (con su cambio de firma), lo primero que falla es gradle/gradle.java (línea 21) porque el complemento 'maven' se movió a 'maven-publish' desde Gradle 7.0 en adelante.

Si este PR no se trata de cambios de Gradle 7.0, creo que hay muchos otros cambios que necesitaríamos hacer como estas eliminaciones, etc. https://docs.gradle.org/current/userguide/upgrading_version_6.html#sec:configuration_removal como parte de pasar a Gradle 7.0, puesto que podemos tomar este cambio.

@davideduma sure. Is this PR about handling the "signing" part when we move to Gradle 7.0 or about moving to Gradle 7.0 itself?

Based on the referenced issue #6981 and 'maven-publish' links in the description of PR i am assuming its the latter.

Locally when i move to Gradle 7.0(with your signing change), the first thing it fails at is gradle/gradle.java ( line 21) because 'maven' plugin is moved to 'maven-publish' from Gradle 7.0 onwards.

If this PR is not about Gradle 7.0 changes, i believe there are many other changes we would need to do like these removals etc. https://docs.gradle.org/current/userguide/upgrading_version_6.html#sec:configuration_removal as part of moving to Gradle 7.0, post which we can take this change.

Please update with the latest commit of this pull request and try again.

The purpose of this pull request is to avoid the error when using a gradle version greater than or equal to 7.0

@fpj fpj changed the title Add plublish maven when gradle version is greater or equal than 7.0 Issue 6981: Add publish maven when gradle version is greater or equal than 7.0 Jan 14, 2023
@shshashwat
Copy link
Contributor

Only changing maven.gradle file won't make it build successfully. Pravega has several gradle files. This PR is incomplete

Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Since this project using Gradle wrapper, I don't think that we should fix the issue like this.

If you're willing to use some good features in 7.x, bump the wrapper version and fix all errors. Otherwise, using the Gradle wrapper.

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.

None yet

7 participants