Syntax for setting contributors in packageJson #78
-
It may be because I am new to Gradle, but it seems to me that in order to set contributors in packages {
named("js") {
packageJson {
keywords.set(listOf("a", "b")) // Setting a list of Strings - OK
author {
name.set("Marco Eckstein") // Configuring a Person - OK
}
contributors.set(listOf()) // // Setting a non-empty list of Person - how?
}
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Have you tried this https://github.com/mpetuska/npm-publish/blob/master/npm-publish-gradle-plugin/src/main/kotlin/extension/domain/json/PackageJson.kt#L189 |
Beta Was this translation helpful? Give feedback.
-
Referring to #78 (comment) I wrote: It does not work because As a workaround I can use: "contributors" by arrayOf(
json {
"name" by "Marco Eckstein"
}
) |
Beta Was this translation helpful? Give feedback.
Have you tried this https://github.com/mpetuska/npm-publish/blob/master/npm-publish-gradle-plugin/src/main/kotlin/extension/domain/json/PackageJson.kt#L189