Package org.gradle.api

Examples of org.gradle.api.UncheckedIOException


    public void copyTo(File target) {
        if (isDirectory()) {
            try {
                FileUtils.copyDirectory(this, target);
            } catch (IOException e) {
                throw new UncheckedIOException(String.format("Could not copy test directory '%s' to '%s'", this,
                        target), e);
            }
        } else {
            try {
                FileUtils.copyFile(this, target);
            } catch (IOException e) {
                throw new UncheckedIOException(String.format("Could not copy test file '%s' to '%s'", this, target), e);
            }
        }
    }
View Full Code Here


   
    public void copyFrom(URL resource) {
        try {
            FileUtils.copyURLToFile(resource, this);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

    public TestFile linkTo(File target) {
        getParentFile().createDir();
        int retval = PosixUtil.current().symlink(target.getAbsolutePath(), getAbsolutePath());
        if (retval != 0) {
            throw new UncheckedIOException(String.format("Could not create link from '%s' to '%s'", target, this));
        }
        return this;
    }
View Full Code Here

    public TestFile touch() {
        try {
            FileUtils.touch(this);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
        assertIsFile();
        return this;
    }
View Full Code Here

    public TestFile createFile() {
        new TestFile(getParentFile()).createDir();
        try {
            assertTrue(isFile() || createNewFile());
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
        return this;
    }
View Full Code Here

                props.store(stream, "comment");
            } finally {
                stream.close();
            }
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

                save = fileChooser.getCurrentDirectory().getCanonicalPath();
            } else {
                save = fileChooser.getSelectedFile().getCanonicalPath();
            }
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
        if (save != null) {
            childNode.setValueOfChild(DIRECTORY_NAME, save);
        }
    }
View Full Code Here

                logger.info("Publishing to Resolver {}", resolver);
                publishEngine.publish(moduleDescriptor, ARTIFACT_PATTERN, resolver,
                        publishOptionsFactory.createPublishOptions(configurations, descriptorDestination));
            }
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

                generate(project);
                renderer.completeProject(project);
            }
            renderer.complete();
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

        public InputStream open()  {
            try {
                return zip.getInputStream(entry);
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        }
View Full Code Here

TOP

Related Classes of org.gradle.api.UncheckedIOException

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.