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
Deprecate buildscript {} in subprojects #7456
Comments
This would be really unfortunate to see removed. buildscript {
project.apply {
from("gradle/repositoryConfig.gradle.kts")
}
repositories {
val buildScriptRepositoryConfig: (RepositoryHandler) -> Unit by extra
buildScriptRepositoryConfig(this)
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${property("kotlin.version")}")
}
}
apply {
// Gives us access to the extensions declared in the repositoryConfig.gradle.kts file.
from("gradle/repositoryConfig.gradle.kts")
}
// Configure the sub-project repository resolver first.
subprojects {
buildscript.repositories {
val buildScriptRepositoryConfig: (RepositoryHandler) -> Unit by rootProject.extra
buildScriptRepositoryConfig(this)
}
} @oehme is your plan to remove support for the |
Not sure I understand the "as well". It's the same thing. |
Ping... Could this be deprecated in Gradle 6.0 so support could be removed in Gradle 7? |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
@gradle/core is this on the queue for idiomatic Gradle? |
Expected Behavior
buildscript {}
in subprojects is deprecated.Current Behavior
No deprecation warning/no message when
buildscript {}
is used in subprojects.Context
Comment from @oehme.
Long story to explain why, but I was searching for info about declaring
buildscript {}
anywhere other than the root build file, and found a definitive comment from @oehme (linked above) that it's a bad idea to do so. Didn't find any existing issue to track it. Seems release of Gradle 5.0 would be an opportune time to deprecate?Steps to Reproduce (for bugs)
N/A
Your Environment
N/A
The text was updated successfully, but these errors were encountered: