@@ -52,12 +52,12 @@ class MergePluginMetaSpec extends PluginSpecification {
52
52
run(TASK_PATH )
53
53
54
54
then : " meta file content corresponds to default config"
55
- metaFile. text == """ \
56
- main: "com.example.testplugin.TestPlugin"
57
- name: "test-plugin"
58
- version: "1.0"
59
- api-version: "1.16"
60
- """ . stripIndent(). trim()
55
+ metaFile. text == """
56
+ main: "com.example.testplugin.TestPlugin"
57
+ name: "test-plugin"
58
+ version: "1.0"
59
+ api-version: "1.16"
60
+ """ . stripIndent(). trim()
61
61
}
62
62
63
63
def ' when merge meta - and generate it again - should skip second task run' () {
@@ -85,13 +85,13 @@ class MergePluginMetaSpec extends PluginSpecification {
85
85
taskOutcome(TASK_PATH ) == TaskOutcome . SUCCESS
86
86
87
87
and : " meta generated with new description"
88
- metaFile. text == """ \
89
- main: "com.example.testplugin.TestPlugin"
90
- name: "test-plugin"
91
- description: "Plugin can has description"
92
- version: "1.0"
93
- api-version: "1.16"
94
- """ . stripIndent(). trim()
88
+ metaFile. text == """
89
+ main: "com.example.testplugin.TestPlugin"
90
+ name: "test-plugin"
91
+ description: "Plugin can has description"
92
+ version: "1.0"
93
+ api-version: "1.16"
94
+ """ . stripIndent(). trim()
95
95
}
96
96
97
97
void ' when merge meta - and all properties configured - should write all lines' () {
@@ -115,15 +115,15 @@ class MergePluginMetaSpec extends PluginSpecification {
115
115
run(TASK_PATH )
116
116
117
117
then : " should write all lines"
118
- metaFile. text == """ \
119
- main: "com.example.plugin.Plugin"
120
- name: "TestPlugin"
121
- description: "Test plugin description"
122
- version: "0.1"
123
- api-version: "1.13"
124
- authors: ["OsipXD", "Contributors"]
125
- website: "http://www.example.com/"
126
- """ . stripIndent(). trim()
118
+ metaFile. text == """
119
+ main: "com.example.plugin.Plugin"
120
+ name: "TestPlugin"
121
+ description: "Test plugin description"
122
+ version: "0.1"
123
+ api-version: "1.13"
124
+ authors: ["OsipXD", "Contributors"]
125
+ website: "http://www.example.com/"
126
+ """ . stripIndent(). trim()
127
127
}
128
128
129
129
void ' when merge meta - and all properties configured old way - should write all lines' () {
@@ -146,15 +146,15 @@ class MergePluginMetaSpec extends PluginSpecification {
146
146
run(TASK_PATH )
147
147
148
148
then : " should write all lines"
149
- metaFile. text == """ \
150
- main: "com.example.plugin.Plugin"
151
- name: "TestPlugin"
152
- description: "Test plugin description"
153
- version: "0.1"
154
- api-version: "1.16"
155
- authors: ["OsipXD", "Contributors"]
156
- website: "http://www.example.com/"
157
- """ . stripIndent(). trim()
149
+ metaFile. text == """
150
+ main: "com.example.plugin.Plugin"
151
+ name: "TestPlugin"
152
+ description: "Test plugin description"
153
+ version: "0.1"
154
+ api-version: "1.16"
155
+ authors: ["OsipXD", "Contributors"]
156
+ website: "http://www.example.com/"
157
+ """ . stripIndent(). trim()
158
158
}
159
159
160
160
void ' when merge meta - and there are extra fields in source - should write all lines' () {
@@ -173,19 +173,19 @@ class MergePluginMetaSpec extends PluginSpecification {
173
173
run(TASK_PATH )
174
174
175
175
then : " should write meta with the extra fields"
176
- metaFile. text == """ \
177
- main: "com.example.testplugin.TestPlugin"
178
- name: "test-plugin"
179
- version: "1.0"
180
- api-version: "1.16"
181
- depend: ["Vault", "ProtocolLib"]
182
- commands:
183
- "example":
184
- description: "Just a command"
185
- permissions:
186
- "example.foo":
187
- description: "My foo permission"
188
- """ . stripIndent(). trim()
176
+ metaFile. text == """
177
+ main: "com.example.testplugin.TestPlugin"
178
+ name: "test-plugin"
179
+ version: "1.0"
180
+ api-version: "1.16"
181
+ depend: ["Vault", "ProtocolLib"]
182
+ commands:
183
+ "example":
184
+ description: "Just a command"
185
+ permissions:
186
+ "example.foo":
187
+ description: "My foo permission"
188
+ """ . stripIndent(). trim()
189
189
}
190
190
191
191
// BukkitGradle-26
@@ -205,15 +205,15 @@ class MergePluginMetaSpec extends PluginSpecification {
205
205
CharsetUtils . setDefaultCharset(' UTF-8' )
206
206
207
207
then :
208
- metaFile. text == """ \
209
- main: "com.example.testplugin.TestPlugin"
210
- name: "test-plugin"
211
- version: "1.0"
212
- api-version: "1.16"
213
- commands:
214
- "퀘스트":
215
- description: "퀘스트 명령어 입니다."
216
- """ . stripIndent(). trim()
208
+ metaFile. text == """
209
+ main: "com.example.testplugin.TestPlugin"
210
+ name: "test-plugin"
211
+ version: "1.0"
212
+ api-version: "1.16"
213
+ commands:
214
+ "퀘스트":
215
+ description: "퀘스트 명령어 입니다."
216
+ """ . stripIndent(). trim()
217
217
}
218
218
219
219
void ' when merge meta - and there are fields in source - should prefer values from source' () {
@@ -227,12 +227,12 @@ class MergePluginMetaSpec extends PluginSpecification {
227
227
run(TASK_PATH , " --stacktrace" )
228
228
229
229
then : " should write meta and prefer source fields"
230
- metaFile. text == """ \
231
- main: "com.example.testplugin.SourceValue"
232
- name: "SourceValue"
233
- version: "1.2"
234
- api-version: "1.16"
235
- """ . stripIndent(). trim()
230
+ metaFile. text == """
231
+ main: "com.example.testplugin.SourceValue"
232
+ name: "SourceValue"
233
+ version: "1.2"
234
+ api-version: "1.16"
235
+ """ . stripIndent(). trim()
236
236
}
237
237
238
238
void ' when merge meta - and there are conflicting fields in source and in build script - should prefer values from build script' () {
@@ -256,11 +256,11 @@ class MergePluginMetaSpec extends PluginSpecification {
256
256
run(TASK_PATH , " --stacktrace" )
257
257
258
258
then : " should write meta and prefer source fields"
259
- metaFile. text == """ \
260
- main: "com.example.testplugin.BuildscriptValue"
261
- name: "BuildscriptValue"
262
- version: "1.3"
263
- api-version: "1.16"
264
- """ . stripIndent(). trim()
259
+ metaFile. text == """
260
+ main: "com.example.testplugin.BuildscriptValue"
261
+ name: "BuildscriptValue"
262
+ version: "1.3"
263
+ api-version: "1.16"
264
+ """ . stripIndent(). trim()
265
265
}
266
266
}
0 commit comments