Class GradleProjectProperties

  • All Implemented Interfaces:
    com.google.cloud.tools.jib.plugins.common.ProjectProperties

    public class GradleProjectProperties
    extends java.lang.Object
    implements com.google.cloud.tools.jib.plugins.common.ProjectProperties
    Obtains information about a Gradle Project that uses Jib.
    • Field Summary

      • Fields inherited from interface com.google.cloud.tools.jib.plugins.common.ProjectProperties

        CACHE_DIRECTORY_NAME
    • Method Detail

      • getForProject

        public static GradleProjectProperties getForProject​(org.gradle.api.Project project,
                                                            org.gradle.api.logging.Logger logger,
                                                            com.google.cloud.tools.jib.filesystem.TempDirectoryProvider tempDirectoryProvider,
                                                            java.lang.String configurationName)
        Generate an instance for a gradle project.
        Parameters:
        project - a gradle project
        logger - a gradle logging instance to use for logging during the build
        tempDirectoryProvider - for scratch space during the build
        configurationName - the configuration of which the dependencies should be packed into the container
        Returns:
        a GradleProjectProperties instance to use in a jib build
      • createJibContainerBuilder

        public com.google.cloud.tools.jib.api.JibContainerBuilder createJibContainerBuilder​(com.google.cloud.tools.jib.api.JavaContainerBuilder javaContainerBuilder,
                                                                                            com.google.cloud.tools.jib.plugins.common.ContainerizingMode containerizingMode)
        Specified by:
        createJibContainerBuilder in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getClassFiles

        public java.util.List<java.nio.file.Path> getClassFiles()
                                                         throws java.io.IOException
        Specified by:
        getClassFiles in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
        Throws:
        java.io.IOException
      • getDependencies

        public java.util.List<java.nio.file.Path> getDependencies()
        Specified by:
        getDependencies in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • waitForLoggingThread

        public void waitForLoggingThread()
        Specified by:
        waitForLoggingThread in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • configureEventHandlers

        public void configureEventHandlers​(com.google.cloud.tools.jib.api.Containerizer containerizer)
        Specified by:
        configureEventHandlers in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • log

        public void log​(com.google.cloud.tools.jib.api.LogEvent logEvent)
        Specified by:
        log in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getToolName

        public java.lang.String getToolName()
        Specified by:
        getToolName in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getToolVersion

        public java.lang.String getToolVersion()
        Specified by:
        getToolVersion in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getPluginName

        public java.lang.String getPluginName()
        Specified by:
        getPluginName in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getMainClassFromJarPlugin

        @Nullable
        public java.lang.String getMainClassFromJarPlugin()
        Specified by:
        getMainClassFromJarPlugin in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getDefaultCacheDirectory

        public java.nio.file.Path getDefaultCacheDirectory()
        Specified by:
        getDefaultCacheDirectory in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getJarPluginName

        public java.lang.String getJarPluginName()
        Specified by:
        getJarPluginName in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • isWarProject

        public boolean isWarProject()
        Specified by:
        isWarProject in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getVersion

        public java.lang.String getVersion()
        Specified by:
        getVersion in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • getMajorJavaVersion

        public int getMajorJavaVersion()
        Specified by:
        getMajorJavaVersion in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • isOffline

        public boolean isOffline()
        Specified by:
        isOffline in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
      • runPluginExtensions

        public com.google.cloud.tools.jib.api.JibContainerBuilder runPluginExtensions​(java.util.List<? extends com.google.cloud.tools.jib.plugins.common.RawConfiguration.ExtensionConfiguration> extensionConfigs,
                                                                                      com.google.cloud.tools.jib.api.JibContainerBuilder jibContainerBuilder)
                                                                               throws com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException
        Specified by:
        runPluginExtensions in interface com.google.cloud.tools.jib.plugins.common.ProjectProperties
        Throws:
        com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException