Search in sources :

Example 1 with SymbolExtractorSpec

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

the class ExtractSymbols method extractSymbols.

// TODO: Need to track version/implementation of symbol extraction tool.
@TaskAction
public void extractSymbols() {
    BuildOperationLogger operationLogger = getServices().get(BuildOperationLoggerFactory.class).newOperationLogger(getName(), getTemporaryDir());
    SymbolExtractorSpec spec = new DefaultSymbolExtractorSpec();
    spec.setBinaryFile(binaryFile.get().getAsFile());
    spec.setSymbolFile(symbolFile.get().getAsFile());
    spec.setOperationLogger(operationLogger);
    Compiler<SymbolExtractorSpec> symbolExtractor = createCompiler();
    symbolExtractor = BuildOperationLoggingCompilerDecorator.wrap(symbolExtractor);
    WorkResult result = symbolExtractor.execute(spec);
    setDidWork(result.getDidWork());
}
Also used : DefaultSymbolExtractorSpec(org.gradle.nativeplatform.internal.DefaultSymbolExtractorSpec) BuildOperationLoggerFactory(org.gradle.internal.operations.logging.BuildOperationLoggerFactory) BuildOperationLogger(org.gradle.internal.operations.logging.BuildOperationLogger) WorkResult(org.gradle.api.tasks.WorkResult) SymbolExtractorSpec(org.gradle.nativeplatform.internal.SymbolExtractorSpec) DefaultSymbolExtractorSpec(org.gradle.nativeplatform.internal.DefaultSymbolExtractorSpec) 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 BuildOperationLoggerFactory (org.gradle.internal.operations.logging.BuildOperationLoggerFactory)1 DefaultSymbolExtractorSpec (org.gradle.nativeplatform.internal.DefaultSymbolExtractorSpec)1 SymbolExtractorSpec (org.gradle.nativeplatform.internal.SymbolExtractorSpec)1