Skip to content

Commit 415542c

Browse files
committed
feat(Meta): Remove quote functions
1 parent 7152209 commit 415542c

2 files changed

Lines changed: 2 additions & 29 deletions

File tree

README.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -116,29 +116,8 @@ website: http://www.example.com
116116
authors: [OsipXD, Contributors]
117117
```
118118

119-
Also you can add custom (unsupported by BukkitGradle) attributes like a `depend` etc.
120-
Just create `plugin.yml` file and put custom attributes into.
121-
122-
#### Quotes around values
123-
In some cases you may need put meta value in quotes. For this you can use `q` and `qq` functions.
124-
125-
For example, we have meta:
126-
```groovy
127-
meta {
128-
name.set(qq("Double Quoted Name"))
129-
description.set(q("Single quoted description"))
130-
url.set("http://without.quot.es/")
131-
}
132-
```
133-
134-
And will be generated:
135-
```yaml
136-
name: "Double Quoted Name"
137-
description: 'Single quoted description'
138-
website: http://without.quot.es/
139-
```
140-
141-
**Note:** In Groovy you can use functions in two ways: normal - `q("value")` and without braces - `q "value"`
119+
If you want to add unsupported by BukkitGradle attributes, like a `depend`, `commands` etc.
120+
Create `plugin.yml` file and put custom attributes there.
142121

143122
### Repositories and Dependencies
144123
BukkitGradle provides short extension-functions to add common repositories and dependencies.

src/main/kotlin/meta/extension/PluginMetaImpl.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,4 @@ public class PluginMetaImpl(objects: ObjectFactory) : PluginMeta {
5656
logger.warnSyntaxChanged("bukkit.meta.authors = [...]", "bukkit.meta.authors.set([...])")
5757
this.authors.set(authors)
5858
}
59-
60-
/** Enclose [value] in single quotes. */
61-
public fun q(value: String): String = "'$value'"
62-
63-
/** Enclose [value] in double quotes. */
64-
public fun qq(value: String): String = "\"$value\""
6559
}

0 commit comments

Comments
 (0)