All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.pity.tasks.collector.CommandLineParameterCollector.groovy Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
package io.pity.tasks.collector


import com.google.inject.Inject
import groovy.transform.CompileStatic
import io.pity.api.cli.CliArgumentProvider
import io.pity.api.WorkingDirectoryProvider
import io.pity.api.environment.EnvironmentCollector

@CompileStatic
class CommandLineParameterCollector extends EnvironmentCollector {

    CliArgumentProvider cliArgumentProvider;

    @Inject
    CommandLineParameterCollector(WorkingDirectoryProvider workingDirectoryProvider, CliArgumentProvider cliArgumentProvider) {
        super(workingDirectoryProvider)
        this.cliArgumentProvider = cliArgumentProvider;
    }

    @Override
    boolean shouldCollect() {
        return true;
    }

    @Override
    void collect() {
        environmentDataBuilder.addData('configured-options', cliArgumentProvider.getRawArgs())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy