Package org.gradle.jvm.platform.internal

Examples of org.gradle.jvm.platform.internal.DefaultJavaPlatform


    }

    private static Set<JavaPlatform> instantiateJavaPlatforms() {
        Set<JavaPlatform> platforms = new LinkedHashSet<JavaPlatform>();
        for (JavaVersion javaVersion : JavaVersion.values()) {
            DefaultJavaPlatform javaPlatform = new DefaultJavaPlatform(javaVersion);
            platforms.add(javaPlatform);
        }
        return platforms;
    }
View Full Code Here


            actions.add(new JarBinarySpecInitializer(buildDir));
            actions.add(new MarkBinariesBuildable());
            final Action<JarBinarySpec> initAction = Actions.composite(actions);

            List<String> targetPlatforms = jvmLibrary.getTargetPlatforms();
            List<JavaPlatform> selectedPlatforms = platforms.chooseFromTargets(JavaPlatform.class, targetPlatforms, new DefaultJavaPlatform(JavaVersion.current()), DEFAULT_PLATFORMS);
            for (final JavaPlatform platform : selectedPlatforms) {
                final JavaToolChain toolChain = toolChains.getForPlatform(platform);
                String binaryName = createBinaryName(jvmLibrary, namingSchemeBuilder, selectedPlatforms, platform);

                binaries.create(binaryName, new Action<JarBinarySpec>() {
View Full Code Here

        void createBinaries(CollectionBuilder<PlayApplicationBinarySpec> binaries, final PlayApplicationSpec componentSpec, @Path("buildDir") final File buildDir) {
            binaries.create(String.format("%sBinary", componentSpec.getName()), new Action<PlayApplicationBinarySpec>() {
                public void execute(PlayApplicationBinarySpec playBinary) {
                    PlayApplicationBinarySpecInternal playBinaryInternal = (PlayApplicationBinarySpecInternal) playBinary;
                    JavaVersion currentJava = JavaVersion.current();
                    playBinaryInternal.setTargetPlatform(new DefaultJavaPlatform(currentJava));
                    playBinaryInternal.setToolChain(new DefaultPlayToolChain(DEFAULT_PLAY_ID, currentJava));
                    playBinaryInternal.setJarFile(new File(buildDir, String.format("jars/%s/%s.jar", componentSpec.getName(), playBinaryInternal.getName())));
                }
            });
        }
View Full Code Here

        target.apply(Collections.singletonMap("plugin", LanguageBasePlugin.class));
        BinaryContainer binaryContainer = target.getExtensions().getByType(BinaryContainer.class);
        binaryContainer.registerFactory(ClassDirectoryBinarySpec.class, new NamedDomainObjectFactory<ClassDirectoryBinarySpec>() {
            public ClassDirectoryBinarySpec create(String name) {
                return instantiator.newInstance(DefaultClassDirectoryBinarySpec.class, name, toolChain, new DefaultJavaPlatform(JavaVersion.current()));
            }
        });

        binaryContainer.withType(ClassDirectoryBinarySpecInternal.class).all(new Action<ClassDirectoryBinarySpecInternal>() {
            public void execute(ClassDirectoryBinarySpecInternal binary) {
View Full Code Here

TOP

Related Classes of org.gradle.jvm.platform.internal.DefaultJavaPlatform

Copyright © 2018 www.massapicom. 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.