Skip to content

Gradle plugin: please consider exposing task parameters directly rather than via extension #21

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
vlsi opened this issue Mar 3, 2020 · 3 comments
Assignees

Comments

@vlsi
Copy link
Contributor

vlsi commented Mar 3, 2020

The current design allows having at most one jcp task per project which might be not enough.

What do you think if the task had its own parameters while the extension serves as the set of default values?

@raydac raydac self-assigned this Mar 3, 2020
@vlsi
Copy link
Contributor Author

vlsi commented Mar 3, 2020

Just in case, I've created my own task (see pgjdbc/pgjdbc#1627 ): https://github.com/vlsi/pgjdbc/blob/gradle/buildSrc/src/main/kotlin/org/postgresql/buildtools/JavaCommentPreprocessorTask.kt

It more-or-less works, however, the configuration with baseDir+sourceFolders+excludedPatterns is kind of rigid.

Ant-like fileset would probably be easier to understand.


PS. you could have plugins { id("...") } in Gradle if you publish an extra .gradle.plugin artifact like https://repo1.maven.org/maven2/com/github/vlsi/checksum-dependency/com.github.vlsi.checksum-dependency.gradle.plugin/1.64/com.github.vlsi.checksum-dependency.gradle.plugin-1.64.pom

That is in your case the coordinates should be com.igormaznitsa.jcp:com.igormaznitsa.jcp.gradle.plugin pom artifact that adds a dependency on a regular jcp artifacts.

@raydac
Copy link
Owner

raydac commented Mar 3, 2020

@vlsi
I made some improvements to define and prefer task properties and use extension properties as default ones, take a look pls

@raydac
Copy link
Owner

raydac commented Sep 26, 2020

so, since 7.0.3 there is no extension for Gradle task

@raydac raydac closed this as completed Sep 26, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants