File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
src/test/groovy/ru/endlesscode/bukkitgradle/meta/task Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -234,4 +234,33 @@ class MergePluginMetaSpec extends PluginSpecification {
234234 api-version: "1.16"
235235 """ . stripIndent(). trim()
236236 }
237+
238+ void ' when merge meta - and there are conflicting fields in source and in build script - should prefer values from build script' () {
239+ given : " source meta file with extra fields"
240+ sourceMetaFile << """
241+ name: SourceValue
242+ version: 1.2
243+ """ . stripIndent()
244+
245+ and : " conflicting gields in build script"
246+ buildFile << """
247+ bukkit {
248+ meta {
249+ name.set("BuildscriptValue")
250+ version.set("1.3")
251+ }
252+ }
253+ """ . stripIndent()
254+
255+ when : " run processResources"
256+ run(TASK_PATH , " --stacktrace" )
257+
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()
265+ }
237266}
You can’t perform that action at this time.
0 commit comments