anchor.diff:  ====
   
   [[sec:list_and_map_literals]]
  -=== List and map literals
  -
  -Groovy provides some shortcuts for defining `List` and `Map` instances. Both kinds of literals are straightforward, but map literals have some interesting twists.
  -
  -For instance, the “`apply`” method (where you typically apply plugins) actually takes a map parameter. However, when you have a line like “`apply plugin:'java'`”, you aren't actually using a map literal, you're actually using “named parameters”, which have almost exactly the same syntax as a map literal (without the wrapping brackets). That named parameter list gets converted to a map when the method is called, but it doesn't start out as a map.
  +=== List and Map Instantiation Shortcuts
  +
  +Groovy provides shortcuts to define `List` and `Map` instances.
  +For example, consider the “`apply`” method, which accepts a map parameter.
  +When you apply a plugin (`apply plugin:'java'`), you don't use a map literal.
  +Plugin application uses "named parameters" instead. Named parameters and map
  +literals use similar syntax, but named parameters don't use wrapping brackets.
  +When you call `apply`, Groovy converts the named parameter list to a map.
   
   .List and map literals
   ====
  
positive.code: ====
  
  [.multi-language-text.lang-groovy]
  In this example, an `ext` block adds two extra properties to the `project` object. Additionally, a property named `purpose` is added to each source set by setting `ext.purpose` to `null` (`null` is a permissible value). Once the properties have been added, they can be read and set like predefined properties.
  
  [.multi-language-text.lang-kotlin]
  In this example, two extra properties are added to the `project` object using `by extra`. Additionally, a property named `purpose` is added to each source set by setting `extra["purpose"]` to `null` (`null` is a permissible value). Once the properties have been added, they can be read and set on `extra`.
  
  By requiring special syntax for adding a property, Gradle can fail fast when an attempt is made to set a (predefined or extra) property but the property is misspelled or does not exist. Extra properties can be accessed from anywhere their owning object can be accessed, giving them a wider scope than local variables. Extra properties on a project are visible from its subprojects.
  
  For further details on extra properties and their API, see the link:{groovyDslPath}/org.gradle.api.plugins.ExtraPropertiesExtension.html[ExtraPropertiesExtension] class in the API documentation.
  
  [[sec:configuring_arbitrary_objects]]
  == Configuring arbitrary objects
  
  You can configure arbitrary objects in the following very readable way.
  
  .Configuring arbitrary objects
  ====
  include::sample[dir="snippets/tutorial/configureObject/groovy",files="build.gradle[]"]
  include::sample[dir="snippets/tutorial/configureObject/kotlin",files="build.gradle.kts[]"]
  
negative.code: [[writing_build_scripts]]
  = Writing Build Scripts
  
  Use a build script to configure a _project_. Each Gradle project corresponds to a software component
  that needs to be built, like a library or an application. Each build script is associated
  with an object of type link:{groovyDslPath}/org.gradle.api.Project.html[Project].
  As the build script executes, it configures this `Project`.
  
  [IMPORTANT]
  .Build scripts, Settings scripts, and Init scripts
  ====
  _Build scripts_ define `Project` objects.
  Gradle uses other scripts as well:
  
  - <<build_lifecycle.adoc#sec:settings_file,Settings scripts>>
    define link:{groovyDslPath}/org.gradle.api.initialization.Settings.html[Settings] objects.
  - <<init_scripts.adoc#init_scripts,Init scripts>>
    define link:{groovyDslPath}/org.gradle.api.invocation.Gradle.html[Gradle] objects.
  ====
  
  == Properties
  
  Almost all top-level properties and blocks in a build script are part of the `Project` API.
  The following build script uses the link:{groovyDslPath}/org.gradle.api.Project.html#org.gradle.api.Project:name[Project.name]
  property to print the name of the project:
  
  .Access a Project property
  ====
  include::sample[dir="snippets/tutorial/projectApi/groovy",files="build.gradle[tags=project-name]"]
  include::sample[dir="snippets/tutorial/projectApi/kotlin",files="build.gradle.kts[tags=project-name]"]
  