Search in sources :

Example 1 with CommandLineArgumentProvider

use of org.gradle.process.CommandLineArgumentProvider in project gradle by gradle.

the class JavaExecHandleBuilder method getAllArguments.

@Override
public List<String> getAllArguments() {
    List<String> arguments = new ArrayList<String>(getAllJvmArgs());
    arguments.add(mainClass);
    arguments.addAll(getArgs());
    for (CommandLineArgumentProvider argumentProvider : argumentProviders) {
        Iterables.addAll(arguments, argumentProvider.asArguments());
    }
    return arguments;
}
Also used : CommandLineArgumentProvider(org.gradle.process.CommandLineArgumentProvider) ArrayList(java.util.ArrayList)

Example 2 with CommandLineArgumentProvider

use of org.gradle.process.CommandLineArgumentProvider in project gradle by gradle.

the class CompileOptions method getAllCompilerArgs.

/**
 * Returns all compiler arguments, added to the {@link #getCompilerArgs()} or the {@link #getCompilerArgumentProviders()} property.
 *
 * @since 4.5
 */
@Internal
public List<String> getAllCompilerArgs() {
    ImmutableList.Builder<String> builder = ImmutableList.builder();
    builder.addAll(CollectionUtils.stringize(getCompilerArgs()));
    for (CommandLineArgumentProvider compilerArgumentProvider : getCompilerArgumentProviders()) {
        builder.addAll(compilerArgumentProvider.asArguments());
    }
    return builder.build();
}
Also used : CommandLineArgumentProvider(org.gradle.process.CommandLineArgumentProvider) ImmutableList(com.google.common.collect.ImmutableList) Internal(org.gradle.api.tasks.Internal)

Example 3 with CommandLineArgumentProvider

use of org.gradle.process.CommandLineArgumentProvider in project gradle by gradle.

the class ProviderAwareCompilerDaemonForkOptions method getAllJvmArgs.

/**
 * Returns the full set of arguments to use to launch the JVM for the compiler process. This includes arguments to define
 * system properties, the minimum/maximum heap size, and the bootstrap classpath.
 *
 * @return The arguments. Returns an empty list if there are no arguments.
 */
@Internal
public List<String> getAllJvmArgs() {
    ImmutableList.Builder<String> builder = ImmutableList.builder();
    builder.addAll(CollectionUtils.stringize(getJvmArgs()));
    for (CommandLineArgumentProvider argumentProvider : getJvmArgumentProviders()) {
        builder.addAll(argumentProvider.asArguments());
    }
    return builder.build();
}
Also used : CommandLineArgumentProvider(org.gradle.process.CommandLineArgumentProvider) ImmutableList(com.google.common.collect.ImmutableList) Internal(org.gradle.api.tasks.Internal)

Example 4 with CommandLineArgumentProvider

use of org.gradle.process.CommandLineArgumentProvider in project gradle by gradle.

the class DefaultJavaForkOptions method copyTo.

@Override
public JavaForkOptions copyTo(JavaForkOptions target) {
    super.copyTo(target);
    options.copyTo(target);
    if (jvmArgumentProviders != null) {
        for (CommandLineArgumentProvider jvmArgumentProvider : jvmArgumentProviders) {
            target.jvmArgs(jvmArgumentProvider.asArguments());
        }
    }
    return this;
}
Also used : CommandLineArgumentProvider(org.gradle.process.CommandLineArgumentProvider)

Example 5 with CommandLineArgumentProvider

use of org.gradle.process.CommandLineArgumentProvider in project MyLuaApp-Build-Core by dingyi222666.

the class CompileOptions method getAllCompilerArgs.

/**
 * Returns all compiler arguments, added to the {@link #getCompilerArgs()} or the {@link #getCompilerArgumentProviders()} property.
 *
 * @since 4.5
 */
@Internal
public List<String> getAllCompilerArgs() {
    ImmutableList.Builder<String> builder = ImmutableList.builder();
    builder.addAll(CollectionUtils.stringize(getCompilerArgs()));
    for (CommandLineArgumentProvider compilerArgumentProvider : getCompilerArgumentProviders()) {
        builder.addAll(compilerArgumentProvider.asArguments());
    }
    return builder.build();
}
Also used : CommandLineArgumentProvider(org.gradle.process.CommandLineArgumentProvider) ImmutableList(com.google.common.collect.ImmutableList) Internal(org.gradle.api.tasks.Internal)

Aggregations

CommandLineArgumentProvider (org.gradle.process.CommandLineArgumentProvider)14 ImmutableList (com.google.common.collect.ImmutableList)6 Test (org.gradle.api.tasks.testing.Test)4 Internal (org.gradle.api.tasks.Internal)3 File (java.io.File)2 ImmutableSet (com.google.common.collect.ImmutableSet)1 BaselineModuleJvmArgsExtension (com.palantir.baseline.extensions.BaselineModuleJvmArgsExtension)1 CLanguagePlugin (dev.nokee.language.c.internal.plugins.CLanguagePlugin)1 CppLanguagePlugin (dev.nokee.language.cpp.internal.plugins.CppLanguagePlugin)1 ToolChainSelectorInternal (dev.nokee.language.nativebase.internal.ToolChainSelectorInternal)1 NokeeStandardToolChainsPlugin (dev.nokee.language.nativebase.internal.toolchains.NokeeStandardToolChainsPlugin)1 ObjectiveCLanguagePlugin (dev.nokee.language.objectivec.internal.plugins.ObjectiveCLanguagePlugin)1 ObjectiveCppLanguagePlugin (dev.nokee.language.objectivecpp.internal.plugins.ObjectiveCppLanguagePlugin)1 ProjectIdentifier (dev.nokee.model.internal.ProjectIdentifier)1 ModelNodes (dev.nokee.model.internal.core.ModelNodes)1 ModelProperties (dev.nokee.model.internal.core.ModelProperties)1 ModelRegistry (dev.nokee.model.internal.registry.ModelRegistry)1 VariantView (dev.nokee.platform.base.VariantView)1 BaseVariant (dev.nokee.platform.base.internal.BaseVariant)1 ComponentIdentifier (dev.nokee.platform.base.internal.ComponentIdentifier)1