Closed vlsi closed 4 years ago
Just in case, I've created my own task (see https://github.com/pgjdbc/pgjdbc/pull/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.
@vlsi I made some improvements to define and prefer task properties and use extension properties as default ones, take a look pls
so, since 7.0.3 there is no extension for Gradle task
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?