-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add support for the renamed Develocity Maven Extension #624
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Gradle Enterprise Maven Extension was renamed to the Develocity Maven Extension in version 1.21. The API was also updated for hte product name change. Unfortunately, this broke compatibility with the Build Validation Scripts. This commit fixes the incompatibility. The fix works by updating the configure-gradle-enterprise-maven-extension to define and register two listeners: a GradleEnterpriseListener and a DevelocityListener. If an older version of the Gradle Enterprise Maven Extension is used, it will load the GradleEnterpriseListener. If a newer version of the Develocity Maven Extension is used, then it will load the DevelocityListener. The Develocity Maven Extension Adapters are used to eliminate duplication between the two different listeners. The develocity-maven-extention-adapters jar has to be added to the Maven extension classpath. The Bash scripts were updated to do so, and the Gradle build scripts were updated to inject the adaptor version into the Bash scripts. ALternatively, we could: 1. Create a fat jar containing the listeners and the adapters 2. Update the bash scripts to search the maven lib dir for the jar, and use the latest one it finds.
...to ensure compatibility with older versions of Maven.
…maven-extension * origin/main: Bump org.apache.maven:maven-core from 3.9.6 to 3.9.7
jthurne
changed the title
Add support for the renamed Deelocity Maven Extension
Add support for the renamed Develocity Maven Extension
May 28, 2024
runningcode
reviewed
May 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a small question otherwise looks good.
components/configure-gradle-enterprise-maven-extension/build.gradle.kts
Outdated
Show resolved
Hide resolved
erichaagdev
requested changes
May 29, 2024
...onfigure-gradle-enterprise-maven-extension/src/main/java/com/gradle/ConfigureDevelocity.java
Outdated
Show resolved
Hide resolved
...onfigure-gradle-enterprise-maven-extension/src/main/java/com/gradle/ConfigureDevelocity.java
Outdated
Show resolved
Hide resolved
...onfigure-gradle-enterprise-maven-extension/src/main/java/com/gradle/ConfigureDevelocity.java
Outdated
Show resolved
Hide resolved
...re-gradle-enterprise-maven-extension/src/main/java/com/gradle/ConfigureGradleEnterprise.java
Outdated
Show resolved
Hide resolved
Unused warnings were previously suppressed because the main classes aren't used directly. However, this suppressed other unused warnings and hid a few things that are not actually used. So this commit unsupresses unused warnings and removes the unused variables and parameters. The attempt to suppress deprecation warnigns on the ConfigureGradleEnterprise class wasn't working because the deprecated classes are referenced in import statements. The class was updated to use the fully qualified name of the deprecated classes.
erichaagdev
approved these changes
Jun 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Brian Demers <brian.demers@gmail.com> Signed-off-by: Jim Hurne <jhurne@gradle.com>
…maven-extension * origin/main: Bump com.google.guava:guava from 33.2.0-jre to 33.2.1-jre Bump Gradle Wrapper from 8.7 to 8.8
jthurne
added a commit
that referenced
this pull request
Jun 14, 2024
* origin/main: Add support for the renamed Develocity Maven Extension (#624)
jthurne
added a commit
that referenced
this pull request
Jun 14, 2024
The Gradle Enterprise Maven Extension was renamed to the Develocity Maven Extension in version 1.21. The API was also updated for the product name change. Unfortunately, this broke compatibility with the Build Validation Scripts. This commit fixes the incompatibility. The fix works by updating the configure-gradle-enterprise-maven-extension to define and register two listeners: a GradleEnterpriseListener and a DevelocityListener. If an older version of the Gradle Enterprise Maven Extension is used, it will load the GradleEnterpriseListener. If a newer version of the Develocity Maven Extension is used, then it will load the DevelocityListener. The Develocity Maven Extension Adapters are used to eliminate duplication between the two different listeners. This commit also creates a "fat jar" so that the develocity-maven-extention-adapters jar does not have to be manually added to the classpath. The project compiles agianst an older version of Maven to ensure compatibility with projects using an older version of Maven. **Remove unused variables and suppress deprecation warnings** Unused warnings were previously suppressed because the main classes aren't used directly. However, this suppressed other unused warnings and hid a few things that are not actually used. So this commit un-supresses unused warnings and removes the unused variables and parameters. The attempt to suppress deprecation warnings on the ConfigureGradleEnterprise class wasn't working because the deprecated classes are referenced in import statements. The class was updated to use the fully qualified name of the deprecated classes. --------- Signed-off-by: Jim Hurne <jhurne@gradle.com> Co-authored-by: Eric Haag <ehaag@gradle.com> Co-authored-by: Brian Demers <brian.demers@gmail.com>
jthurne
added a commit
that referenced
this pull request
Jun 14, 2024
* origin/main: Add support for the renamed Develocity Maven Extension (#624)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 Gradle Enterprise Maven Extension was renamed to the Develocity Maven
Extension in version 1.21. The API was also updated for hte product name
change. Unfortunately, this broke compatibility with the Build Validation
Scripts. This commit fixes the incompatibility.
The fix works by updating the configure-gradle-enterprise-maven-extension to
define and register two listeners: a GradleEnterpriseListener and a
DevelocityListener. If an older version of the Gradle Enterprise Maven
Extension is used, it will load the GradleEnterpriseListener. If a newer
version of the Develocity Maven Extension is used, then it will load the
DevelocityListener. The Develocity Maven Extension Adapters are used to
eliminate duplication between the two different listeners.
To ensure compatibility with older verisons of Maven, this PR also
updates the extension to be compiled against an earlier version of
maven-core.