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

org.eclipse.edc.plugins.edcbuild.extensions.BuildExtension Maven / Gradle / Ivy

The newest version!
/*
 *  Copyright (c) 2022 Microsoft Corporation
 *
 *  This program and the accompanying materials are made available under the
 *  terms of the Apache License, Version 2.0 which is available at
 *  https://www.apache.org/licenses/LICENSE-2.0
 *
 *  SPDX-License-Identifier: Apache-2.0
 *
 *  Contributors:
 *       Microsoft Corporation - initial API and implementation
 *       Fraunhofer Institute for Software and Systems Engineering - add publish property
 *
 */

package org.eclipse.edc.plugins.edcbuild.extensions;

import org.gradle.api.Action;
import org.gradle.api.model.ObjectFactory;
import org.gradle.api.provider.Property;
import org.gradle.jvm.toolchain.JavaLanguageVersion;

/**
 * Root configuration resource for the EDC Build plugin
 */
public abstract class BuildExtension {
    private final MavenPomExtension pom;
    private final SwaggerGeneratorExtension swagger;

    public BuildExtension(ObjectFactory objectFactory) {
        pom = objectFactory.newInstance(MavenPomExtension.class);
        swagger = objectFactory.newInstance(SwaggerGeneratorExtension.class);
    }

    public void pom(Action action) {
        action.execute(pom);
    }

    public void swagger(Action action) {
        action.execute(swagger);
    }

    public MavenPomExtension getPom() {
        return pom;
    }

    public abstract Property getJavaLanguageVersion();

    public SwaggerGeneratorExtension getSwagger() {
        return swagger;
    }

    public abstract Property getPublish();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy