-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
support gradle plugins in a build profile #9437
support gradle plugins in a build profile #9437
Conversation
src/main/java/tech/jhipster/lite/module/domain/gradleplugin/GradlePlugin.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
private void addDependencyToBuildGradle(JavaDependency dependency, Optional<BuildProfileId> buildProfile) { | ||
private void addDependencyToBuildGradle(JavaDependency dependency, Path buildGradleFile, boolean forBuildProfile) { |
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.
@murdos : I still do not like this many parameters but I couldn't think of a better way (I was struggling here)
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.
@murdos : maybe because this profile plugin implementation is counterintuitive, I couldn't think of an elegant way to make the method buildGradleFile
handle the PLUGIN_BUILD_GRADLE_FILE = "buildSrc/build.gradle.kts";
private Path buildGradleFile(Optional<BuildProfileId> buildProfile) {
return buildProfile
.map(buildProfileId -> {
File scriptPlugin = scriptPluginForProfile(buildProfileId);
if (!scriptPlugin.exists()) {
throw new MissingGradleProfileException(buildProfileId);
}
return scriptPlugin.toPath();
})
.orElse(projectFolder.filePath(BUILD_GRADLE_FILE));
}
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9437 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 2959 2982 +23
===========================================
Files 737 740 +3
Lines 12819 12909 +90
Branches 259 259
===========================================
+ Hits 12819 12909 +90 ☔ View full report in Codecov by Sentry. |
...hipster/lite/module/infrastructure/secondary/javadependency/gradle/GradleCommandHandler.java
Outdated
Show resolved
Hide resolved
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.
I did a first partial review, focused on API design.
I've not yet reviewed GradleCommandHandler, it'll wait until design is settled.
...n/java/tech/jhipster/lite/module/domain/javabuildprofile/JHipsterModuleJavaBuildProfile.java
Outdated
Show resolved
Hide resolved
src/main/java/tech/jhipster/lite/module/domain/gradleplugin/GradlePlugin.java
Outdated
Show resolved
Hide resolved
...hipster/lite/module/infrastructure/secondary/javadependency/gradle/GradleCommandHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/tech/jhipster/lite/module/domain/gradleplugin/GradleProfilePlugin.java
Outdated
Show resolved
Hide resolved
src/main/resources/generator/buildtool/gradle/buildSrc/build.gradle.kts.template
Show resolved
Hide resolved
src/main/java/tech/jhipster/lite/module/domain/gradleplugin/GradlePlugin.java
Outdated
Show resolved
Hide resolved
696c911
to
f94ec3a
Compare
src/main/java/tech/jhipster/lite/module/domain/gradleplugin/GradleCommunityPlugin.java
Outdated
Show resolved
Hide resolved
src/main/java/tech/jhipster/lite/module/domain/gradleplugin/JHipsterModuleGradlePlugins.java
Outdated
Show resolved
Hide resolved
...n/java/tech/jhipster/lite/module/domain/gradleplugin/JHipsterModuleGradleProfilePlugins.java
Outdated
Show resolved
Hide resolved
...hipster/lite/module/infrastructure/secondary/javadependency/gradle/GradleCommandHandler.java
Outdated
Show resolved
Hide resolved
...ter/lite/module/infrastructure/secondary/javadependency/gradle/GradleCommandHandlerTest.java
Outdated
Show resolved
Hide resolved
fdcfd0c
to
f95a37f
Compare
Hello, |
@renanfranca : it's not specific to your branch, this is a generalized issue with the codecov action: codecov/codecov-action#1359 |
Thanks! |
@murdos : please, take a look at this:
He fixed like you did and it seems to working as you can see at the latest actions |
Another possibility of fix (pybop-team/PyBOP#276 (comment)):
|
…gins in a build profile
…om DependencyId and use plugin versionSlug as dependency versionSlug internally
f95a37f
to
fdb5e69
Compare
Fix #8627