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

Allowing "apply false" to core plugin. #28235

Closed
iseki0 opened this issue Feb 26, 2024 · 3 comments
Closed

Allowing "apply false" to core plugin. #28235

iseki0 opened this issue Feb 26, 2024 · 3 comments
Labels
a:feature A new functionality closed:not-fixed Indicates the issue was not fixed and is not planned to be

Comments

@iseki0
Copy link

iseki0 commented Feb 26, 2024

Expected Behavior

Allow the following code in build.gradle.kts:

plugins {
    signing apply false
}

Current Behavior (optional)

Error resolving plugin [id: 'org.gradle.signing', apply: false]
> Plugin 'org.gradle.signing' is a core Gradle plugin, which is already on the classpath. Requesting it with the 'apply false' option is a no-op.

Context

When we use Kotlin DSL, we need gradle generate stubs for script executing. In root project I have to use allprojects{} and subprojects{} block. If we don't add the plugin to plugins{} the stubs will not be generated. Otherwise the plugin will generate unused tasks. It's a problem, it mess up the task hierarchy.

@iseki0 iseki0 added a:feature A new functionality to-triage labels Feb 26, 2024
@iseki0
Copy link
Author

iseki0 commented Feb 26, 2024

@ov7a
Copy link
Member

ov7a commented Feb 28, 2024

It's hard to achieve this with a static compiled language.

The workaround is to use convention plugins or using dynamic accessors like project.extensions.getByName().

@ov7a ov7a closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
@ov7a ov7a added closed:not-fixed Indicates the issue was not fixed and is not planned to be and removed to-triage labels Feb 28, 2024
@iseki0
Copy link
Author

iseki0 commented Feb 28, 2024

And, there's a post as a reference that explain I'm in a X-Y problem and my solution doesn't work for the feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality closed:not-fixed Indicates the issue was not fixed and is not planned to be
Projects
None yet
Development

No branches or pull requests

2 participants