Package org.gradle.api

Examples of org.gradle.api.GradleException


      final ClassPool pool = createPool();
      final LoaderAction action = new LoaderAction(pool, destinationDir, this.transformation);

      stream.process(action);
    } catch (Exception e) {
      throw new GradleException("Could not execute transformation", e);
    }

    return new SimpleWorkResult(true);
  }
View Full Code Here


            this.transformation.applyTransformations(clazz);
            clazz.writeFile(this.destinationDir);
          }
        }
      } catch (Exception e) {
        throw new GradleException("An error occurred while trying to process class file ", e);
      }
    }
View Full Code Here

            NodeList stdErrElements = document.getElementsByTagName("system-err");
            for (int i = 0; i < stdErrElements.getLength(); i++) {
                suiteResults.addStandardError(stdErrElements.item(i).getTextContent());
            }
        } catch (Exception e) {
            throw new GradleException(String.format("Could not load test results from '%s'.", file), e);
        } finally {
            Closeables.closeQuietly(inputStream);
        }
    }
View Full Code Here

                    generatePage(classResults, new ClassPageRenderer(reportType),
                            new File(reportDir, classResults.getFilename(reportType) + ".html"));
                }
            }
        } catch (Exception e) {
            throw new GradleException(
                    String.format("Could not generate test report to '%s'.", reportDir), e);
        }
    }
View Full Code Here

        for (final File file : getSource().getFiles()) {
            final List<String> command = buildCommand(file.getAbsolutePath());
            getProject().getLogger().info("Running thrift: " + command);
            if (!out.isDirectory()) {
                if (!out.mkdirs()) {
                    throw new GradleException("Could not create thrift output directory: " + out);
                }
            }
            final CountDownLatch latch = new CountDownLatch(2);
            final Process p = new ProcessBuilder(command)
                    .start();
            new SlurpThread(latch, p.getInputStream(), System.out).start();
            new SlurpThread(latch, p.getErrorStream(), System.err).start();

            if (p.waitFor() != 0) {
                latch.countDown();
                throw new GradleException(thriftExecutable() + " command failed");
            }
            latch.await();
        }
    }
View Full Code Here

            NodeList stdErrElements = document.getElementsByTagName("system-err");
            for (int i = 0; i < stdErrElements.getLength(); i++) {
                suiteResults.addStandardError(stdErrElements.item(i).getTextContent());
            }
        } catch (Exception e) {
            throw new GradleException(String.format("Could not load test results from '%s'.", file), e);
        } finally {
            try {
                Closeables.close(inputStream, true /* swallowIOException */);
            } catch (IOException e) {
                // cannot happen
View Full Code Here

                    generatePage(classResults, new ClassPageRenderer(reportType),
                            new File(reportDir, classResults.getFilename(reportType) + ".html"));
                }
            }
        } catch (Exception e) {
            throw new GradleException(
                    String.format("Could not generate test report to '%s'.", reportDir), e);
        }
    }
View Full Code Here

      final ClassPool pool = createPool(this.sources);
      final LoaderAction action = new LoaderAction(pool, destinationDir, this.transformation);

      stream.process(action);
    } catch (Exception e) {
      throw new GradleException("Could not execute transformation", e);
    }

    return new SimpleWorkResult(true);
  }
View Full Code Here

            this.transformation.applyTransformations(clazz);
            clazz.writeFile(this.destinationDir);
          }
        }
      } catch (Exception e) {
        throw new GradleException("An error occurred while trying to process class file ", e);
      }
    }
View Full Code Here

    try {
      final ClassPool pool = createPool();

      this.process(pool, this.sources);
    } catch (Exception e) {
      throw new GradleException("Could not execute transformation", e);
    }

    return true;
  }
View Full Code Here

TOP

Related Classes of org.gradle.api.GradleException

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.