Class CppEcosystemUtilities

java.lang.Object
dev.nokee.companion.CppEcosystemUtilities

@NonExtensible public abstract class CppEcosystemUtilities extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    CppEcosystemUtilities(org.gradle.api.tasks.TaskContainer tasks, org.gradle.api.artifacts.ConfigurationContainer configurations, org.gradle.api.Project project)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ShadowProperty<org.gradle.api.file.FileCollection>
    compileIncludePathOf(org.gradle.language.cpp.CppBinary binary)
    Returns a property to configure compile include path of a C++ binary.
    org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration>
    compileOnlyApiOf(org.gradle.language.cpp.CppLibrary library)
    Returns a configurable provider to the compile only API dependency bucket of the specified library.
    org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration>
    compileOnlyOf(org.gradle.language.cpp.CppComponent component)
    Returns a configurable provider to the compile only dependency bucket of the specified component.
    org.gradle.api.tasks.TaskProvider<CppCompile>
    compileTaskOf(org.gradle.language.cpp.CppBinary binary)
    Returns a configurable provider to the compile task of the specified binary.
    org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration>
    cppCompileOf(org.gradle.language.cpp.CppBinary binary)
    Returns a configurable provider to the cpp compile configuration of the specified binary.
    ShadowProperty<org.gradle.api.file.FileCollection>
    cppSourceOf(org.gradle.language.cpp.CppBinary binary)
    Returns the shadow property of CppBinary.getCppSource().
    ShadowProperty<org.gradle.api.file.FileCollection>
    cppSourceOf(org.gradle.language.cpp.CppComponent component)
    Returns the shadow property of CppComponent.getCppSource().
    org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.tasks.CreateStaticLibrary>
    createTaskOf(org.gradle.language.nativeplatform.ComponentWithStaticLibrary binary)
    Returns a configurable provider to the create task of the specified binary.
    debuggabilityOf(org.gradle.language.cpp.CppBinary binary)
    Returns a property to configure debuggability of a C++ binary.
    forProject(org.gradle.api.Project project)
     
    org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.tasks.InstallExecutable>
    installTaskOf(org.gradle.language.nativeplatform.ComponentWithInstallation binary)
    Returns a configurable provider to the install task of the specified binary.
    org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration>
    linkElementsOf(org.gradle.language.nativeplatform.ComponentWithLinkUsage binary)
    Returns a configurable provider to the link elements configuration of the specified binary.
    org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.tasks.LinkExecutable>
    linkTaskOf(org.gradle.language.nativeplatform.ComponentWithExecutable binary)
    Returns a configurable provider to the link task of the specified binary.
    org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.tasks.LinkSharedLibrary>
    linkTaskOf(org.gradle.language.nativeplatform.ComponentWithSharedLibrary binary)
    Returns a configurable provider to the link task of the specified binary.
    org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration>
    nativeLinkOf(org.gradle.language.cpp.CppBinary binary)
    Returns a configurable provider to the native link configuration of the specified binary.
    org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration>
    nativeRuntimeOf(org.gradle.language.cpp.CppBinary binary)
    Returns a configurable provider to the native runtime configuration of the specified binary.
    ShadowProperty<org.gradle.api.file.FileCollection>
    objectsOf(org.gradle.language.nativeplatform.ComponentWithObjectFiles binary)
    Returns the shadow property of ComponentWithObjectFiles.getObjects().
    optimizationOf(org.gradle.language.cpp.CppBinary binary)
    Returns a property to configure optimization of a C++ binary.
    org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.test.tasks.RunTestExecutable>
    runTaskOf(org.gradle.nativeplatform.test.cpp.CppTestExecutable binary)
    Returns a configurable provider to the run task of the specified binary.
    org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration>
    runtimeElementsOf(org.gradle.language.nativeplatform.ComponentWithRuntimeUsage binary)
    Returns a configurable provider to the runtime elements configuration of the specified binary.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CppEcosystemUtilities

      @Inject public CppEcosystemUtilities(org.gradle.api.tasks.TaskContainer tasks, org.gradle.api.artifacts.ConfigurationContainer configurations, org.gradle.api.Project project)
  • Method Details

    • compileTaskOf

      public org.gradle.api.tasks.TaskProvider<CppCompile> compileTaskOf(org.gradle.language.cpp.CppBinary binary)
      Returns a configurable provider to the compile task of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the compile task of the specified binary
    • linkTaskOf

      public org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.tasks.LinkExecutable> linkTaskOf(org.gradle.language.nativeplatform.ComponentWithExecutable binary)
      Returns a configurable provider to the link task of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the link task of the specified binary
    • installTaskOf

      public org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.tasks.InstallExecutable> installTaskOf(org.gradle.language.nativeplatform.ComponentWithInstallation binary)
      Returns a configurable provider to the install task of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the install task of the specified binary
    • linkTaskOf

      public org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.tasks.LinkSharedLibrary> linkTaskOf(org.gradle.language.nativeplatform.ComponentWithSharedLibrary binary)
      Returns a configurable provider to the link task of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the link task of the specified binary
    • createTaskOf

      public org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.tasks.CreateStaticLibrary> createTaskOf(org.gradle.language.nativeplatform.ComponentWithStaticLibrary binary)
      Returns a configurable provider to the create task of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the create task of the specified binary
    • runTaskOf

      public org.gradle.api.tasks.TaskProvider<org.gradle.nativeplatform.test.tasks.RunTestExecutable> runTaskOf(org.gradle.nativeplatform.test.cpp.CppTestExecutable binary)
      Returns a configurable provider to the run task of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the run task of the specified binary
    • linkElementsOf

      public org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration> linkElementsOf(org.gradle.language.nativeplatform.ComponentWithLinkUsage binary)
      Returns a configurable provider to the link elements configuration of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the link elements configuration of the specified binary
    • runtimeElementsOf

      public org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration> runtimeElementsOf(org.gradle.language.nativeplatform.ComponentWithRuntimeUsage binary)
      Returns a configurable provider to the runtime elements configuration of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the runtime elements configuration of the specified binary
    • compileOnlyOf

      public org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration> compileOnlyOf(org.gradle.language.cpp.CppComponent component)
      Returns a configurable provider to the compile only dependency bucket of the specified component.
      Parameters:
      component - the target component
      Returns:
      a configurable provider to the compile only dependency bucket of the specified component
    • compileOnlyApiOf

      public org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration> compileOnlyApiOf(org.gradle.language.cpp.CppLibrary library)
      Returns a configurable provider to the compile only API dependency bucket of the specified library.
      Parameters:
      library - the target component
      Returns:
      a configurable provider to the compile only API dependency bucket of the specified library
    • cppCompileOf

      public org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration> cppCompileOf(org.gradle.language.cpp.CppBinary binary)
      Returns a configurable provider to the cpp compile configuration of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the cpp compile configuration of the specified binary
    • nativeLinkOf

      public org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration> nativeLinkOf(org.gradle.language.cpp.CppBinary binary)
      Returns a configurable provider to the native link configuration of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the native link configuration of the specified binary
    • nativeRuntimeOf

      public org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.Configuration> nativeRuntimeOf(org.gradle.language.cpp.CppBinary binary)
      Returns a configurable provider to the native runtime configuration of the specified binary.
      Parameters:
      binary - the target binary
      Returns:
      a configurable provider to the native runtime configuration of the specified binary
    • optimizationOf

      public ShadowProperty<Boolean> optimizationOf(org.gradle.language.cpp.CppBinary binary)
      Returns a property to configure optimization of a C++ binary. Due to the strict nature of C++ binary, we are using shadow properties to perform the mutation. All code relying on this value should be made aware of a potential shadow value.
      Parameters:
      binary - the C++ binary
      Returns:
      the optimized property
    • debuggabilityOf

      public ShadowProperty<Boolean> debuggabilityOf(org.gradle.language.cpp.CppBinary binary)
      Returns a property to configure debuggability of a C++ binary. Due to the strict nature of C++ binary, we are using shadow properties to perform the mutation. All code relying on this value should be made aware of a potential shadow value.
      Parameters:
      binary - the C++ binary
      Returns:
      the debuggable property
    • compileIncludePathOf

      public ShadowProperty<org.gradle.api.file.FileCollection> compileIncludePathOf(org.gradle.language.cpp.CppBinary binary)
      Returns a property to configure compile include path of a C++ binary. Due to the strict nature of C++ binary, we are using shadow properties to perform the mutation. All code relying on this value should be made aware of a potential shadow value.
      Parameters:
      binary - the C++ binary
      Returns:
      the compile include path property
    • objectsOf

      public ShadowProperty<org.gradle.api.file.FileCollection> objectsOf(org.gradle.language.nativeplatform.ComponentWithObjectFiles binary)
      Returns the shadow property of ComponentWithObjectFiles.getObjects().
      Parameters:
      binary - the binary with the objects
      Returns:
      the property
    • cppSourceOf

      public ShadowProperty<org.gradle.api.file.FileCollection> cppSourceOf(org.gradle.language.cpp.CppBinary binary)
      Returns the shadow property of CppBinary.getCppSource().
      Parameters:
      binary - the binary with C++ source.
      Returns:
      the property
    • cppSourceOf

      public ShadowProperty<org.gradle.api.file.FileCollection> cppSourceOf(org.gradle.language.cpp.CppComponent component)
      Returns the shadow property of CppComponent.getCppSource().
      Parameters:
      component - the component with C++ source.
      Returns:
      the property
    • forProject

      public static CppEcosystemUtilities forProject(org.gradle.api.Project project)