Providing a configuration DSL for the plugin using a nested Array or List

Hello All,
I’ read this tutorial

and I extended the object a little bit

package de.docs_as_co.toolchain.publish.askForHelp

import org.gradle.api.Action
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.model.ObjectFactory

class Person {
    String name

class Group {
   Person person

class GreetingPluginExtension {
    String message
    final Group greeter

    GreetingPluginExtension(ObjectFactory objectFactory) {

        greeter = objectFactory.newInstance(Group)
        greeter.person = objectFactory.newInstance(Person)

    void greeter(Action<? super Group> action) {

    void person(Action<? super Person> action) {

class GreetingPlugin implements Plugin<Project> {
    void apply(Project project) {
        // Create the extension, passing in an ObjectFactory for it to use
        def extension = project.extensions.create('greeting', GreetingPluginExtension, project.objects)
        project.task('hello') {
            doLast {
                println "${extension.message} from ${}"

apply plugin: de.docs_as_co.toolchain.publish.askForHelp.GreetingPlugin

greeting {
    message = 'Hi'
    person {
        name = 'Tom'

The problem: A group can contain more that one person. How to change the code to achieve this?
Thanks for help