All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.rk0cc.willpub.pubspec.data.PubspecStructure Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package xyz.rk0cc.willpub.pubspec.data;

import xyz.rk0cc.josev.SemVer;
import xyz.rk0cc.willpub.pubspec.data.dependencies.*;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.net.URL;
import java.util.Map;

/**
 * Interface that defining pubspec.yaml field structure to {@link Pubspec} and {@link PubspecSnapshot}.
 *
 * @since 1.0.0
 */
interface PubspecStructure {
    /**
     * name in pubspec.yaml.
     *
     * @return Package name.
     */
    @Nonnull
    String name();

    /**
     * environment in pubspec.yaml.
     *
     * @return Package environment.
     */
    @Nonnull
    PubspecEnvironment environment();

    /**
     * version in pubspec.yaml.
     *
     * @return Package version.
     */
    @Nullable
    SemVer version();

    /**
     * description in pubspec.yaml.
     *
     * @return Package description.
     */
    @Nullable
    String description();

    /**
     * publish_to in pubspec.yaml.
     *
     * @return Package publish location.
     */
    @Nullable
    String publishTo();

    /**
     * homepage in pubspec.yaml.
     *
     * @return Package homepage.
     */
    @Nullable
    URL homepage();

    /**
     * repository in pubspec.yaml.
     *
     * @return Package repository.
     */
    @Nullable
    URL repository();

    /**
     * issue_tracker in pubspec.yaml.
     *
     * @return Package issue tracker.
     */
    @Nullable
    URL issueTracker();

    /**
     * documentation in pubspec.yaml.
     *
     * @return Package documentation.
     */
    @Nullable
    URL documentation();

    /**
     * dependencies in pubspec.yaml.
     *
     * @return Package dependencies.
     */
    @Nonnull
    ImportedReferenceSet dependencies();

    /**
     * dev_dependencies in pubspec.yaml.
     *
     * @return Package development dependencies.
     */
    @Nonnull
    ImportedReferenceSet devDependencies();

    /**
     * dependency_overrides in pubspec.yaml.
     *
     * @return Package override dependencies.
     */
    @Nonnull
    OverrideReferenceSet dependencyOverrides();

    /**
     * Fields in pubspec.yaml which does not declare in this interface.
     *
     * @return Additional field map data.
     */
    @Nonnull
    Map additionalData();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy