-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Deprecations fixes and minor improvements in gradle scripts #10036
Conversation
75ba45b
to
a0a28d6
Compare
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.
Looks almost good. I would revert the all
changes which do not make sense and fix the layout
things.
@@ -14,7 +14,7 @@ repositories { | |||
mavenCentral() | |||
} | |||
|
|||
configurations.all { | |||
configurations.configureEach { |
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.
This is actually not required. Configurations cannot be configured lazily. Actually using configureEach
on the configuration container can lead to hard to debug errors, so I would simply revert these changes.
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.
@melix I didi it, because Idea every time tell me, that is configureEach better than all:
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.
Don't always trust your IDE I guess ;)
@@ -5,7 +5,7 @@ plugins { | |||
} | |||
|
|||
tasks.named("htmlSanityCheck") { | |||
sourceDir = new File("${rootProject.buildDir}/docs/guide/") | |||
sourceDir = file("${rootProject.layout.buildDirectory.asFile.get()}/docs/guide/") |
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.
❌ This is a mix of file
and layout
.
sourceDir = file("${rootProject.layout.buildDirectory.asFile.get()}/docs/guide/") | |
sourceDir = rootProject.layout.buildDirectory.dir("docs/guide").get().asFile |
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.
fixed
core/build.gradle
Outdated
@@ -31,7 +31,7 @@ spotless { | |||
} | |||
|
|||
def versionInfo = tasks.register("micronautVersionInfo", WriteProperties) { | |||
outputFile = "${buildDir}/resources/version/micronaut-version.properties" | |||
destinationFile = file("${layout.buildDirectory.asFile.get()}/resources/version/micronaut-version.properties") |
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.
❌ destinationFile
is a proper RegularFileProperty
destinationFile = file("${layout.buildDirectory.asFile.get()}/resources/version/micronaut-version.properties") | |
destinationFile = layout.buildDirectory.file("resources/version/micronaut-version.properties") |
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.
fixed
@@ -48,7 +48,7 @@ graalvmNative { | |||
enabled = true | |||
} | |||
binaries { | |||
all { | |||
configureEach { |
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.
Same here, configureEach
doesn't make sense since it's a model element, so it will register tasks in any case. This will never be lazy.
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.
reverted
I reverted |
No description provided.