Examples of maybeCreate()


Examples of org.gradle.language.base.FunctionalSourceSet.maybeCreate()

    private <U extends LanguageSourceSet> void createDefaultSourceSetForComponents(final LanguageRegistration<U> languageRegistration, ComponentSpecContainer components) {
        components.withType(ComponentSpecInternal.class).all(new Action<ComponentSpecInternal>() {
            public void execute(final ComponentSpecInternal componentSpecInternal) {
                final FunctionalSourceSet functionalSourceSet = componentSpecInternal.getSources();
                if (componentSpecInternal.getInputTypes().contains(languageRegistration.getOutputType())) {
                    functionalSourceSet.maybeCreate(languageRegistration.getName(), languageRegistration.getSourceSetType());
                }
            }
        });
    }
View Full Code Here

Examples of org.gradle.language.base.FunctionalSourceSet.maybeCreate()

        @Mutate
        public void configureCUnitTestSuiteSources(ProjectSourceSet projectSourceSet, TestSuiteContainer testSuites, @Path("buildDir") File buildDir) {

            for (final CUnitTestSuiteSpec suite : testSuites.withType(CUnitTestSuiteSpec.class)) {
                FunctionalSourceSet suiteSourceSet = suite.getSources();
                CSourceSet launcherSources = suiteSourceSet.maybeCreate(CUNIT_LAUNCHER_SOURCE_SET, CSourceSet.class);
                File baseDir = new File(buildDir, String.format("src/%s/cunitLauncher", suite.getName()));
                launcherSources.getSource().srcDir(new File(baseDir, "c"));
                launcherSources.getExportedHeaders().srcDir(new File(baseDir, "headers"));
                CSourceSet testSources = suiteSourceSet.maybeCreate("c", CSourceSet.class);
                testSources.lib(launcherSources);
View Full Code Here

Examples of org.gradle.language.base.FunctionalSourceSet.maybeCreate()

                FunctionalSourceSet suiteSourceSet = suite.getSources();
                CSourceSet launcherSources = suiteSourceSet.maybeCreate(CUNIT_LAUNCHER_SOURCE_SET, CSourceSet.class);
                File baseDir = new File(buildDir, String.format("src/%s/cunitLauncher", suite.getName()));
                launcherSources.getSource().srcDir(new File(baseDir, "c"));
                launcherSources.getExportedHeaders().srcDir(new File(baseDir, "headers"));
                CSourceSet testSources = suiteSourceSet.maybeCreate("c", CSourceSet.class);
                testSources.lib(launcherSources);
            }
        }

        @Mutate
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.