Search in sources :

Example 1 with DefaultStaticLibraryArchiverSpec

use of org.gradle.nativeplatform.internal.DefaultStaticLibraryArchiverSpec in project gradle by gradle.

the class CreateStaticLibrary method link.

// TODO: Need to track version/implementation of ar tool.
@TaskAction
protected void link() {
    StaticLibraryArchiverSpec spec = new DefaultStaticLibraryArchiverSpec();
    spec.setTempDir(getTemporaryDir());
    spec.setOutputFile(getOutputFile().get().getAsFile());
    spec.objectFiles(getSource());
    spec.args(getStaticLibArgs().get());
    BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
    spec.setOperationLogger(operationLogger);
    Compiler<StaticLibraryArchiverSpec> compiler = createCompiler();
    WorkResult result = BuildOperationLoggingCompilerDecorator.wrap(compiler).execute(spec);
    setDidWork(result.getDidWork());
}
Also used : DefaultStaticLibraryArchiverSpec(org.gradle.nativeplatform.internal.DefaultStaticLibraryArchiverSpec) StaticLibraryArchiverSpec(org.gradle.nativeplatform.internal.StaticLibraryArchiverSpec) DefaultStaticLibraryArchiverSpec(org.gradle.nativeplatform.internal.DefaultStaticLibraryArchiverSpec) BuildOperationLogger(org.gradle.internal.operations.logging.BuildOperationLogger) WorkResult(org.gradle.api.tasks.WorkResult) TaskAction(org.gradle.api.tasks.TaskAction)

Aggregations

TaskAction (org.gradle.api.tasks.TaskAction)1 WorkResult (org.gradle.api.tasks.WorkResult)1 BuildOperationLogger (org.gradle.internal.operations.logging.BuildOperationLogger)1 DefaultStaticLibraryArchiverSpec (org.gradle.nativeplatform.internal.DefaultStaticLibraryArchiverSpec)1 StaticLibraryArchiverSpec (org.gradle.nativeplatform.internal.StaticLibraryArchiverSpec)1