Package org.gradle.api

Examples of org.gradle.api.GradleException


            tempFile.deleteOnExit();

            return tempFile;
        } catch (IOException e) {
            throw new GradleException("failed to create temp file to extract class from jar into", e);
        }
    }
View Full Code Here


        try {
            classStream = new BufferedInputStream(new FileInputStream(testClassFile));
            final ClassReader classReader = new ClassReader(classStream);
            classReader.accept(classVisitor, ClassReader.SKIP_DEBUG | ClassReader.SKIP_CODE | ClassReader.SKIP_FRAMES);
        } catch (Throwable e) {
            throw new GradleException("failed to read class file " + testClassFile.getAbsolutePath(), e);
        } finally {
            IOUtils.closeQuietly(classStream);
        }

        return classVisitor;
View Full Code Here

    public void processTestClass(TestClassRunInfo testClass) {
        try {
            testClasses.add(applicationClassLoader.loadClass(testClass.getTestClassName()));
        } catch (Throwable e) {
            throw new GradleException(String.format("Could not load test class '%s'.", testClass.getTestClassName()), e);
        }
    }
View Full Code Here

        testNg.setExcludedGroups(GUtil.join(options.getExcludeGroups(), ","));
        for (String listenerClass : options.getListeners()) {
            try {
                testNg.addListener(applicationClassLoader.loadClass(listenerClass).newInstance());
            } catch (Throwable e) {
                throw new GradleException(String.format("Could not add a test listener with class '%s'.", listenerClass), e);
            }
        }

        if (!suiteFiles.isEmpty()) {
            testNg.setTestSuites(GFileUtils.toPaths(suiteFiles));
View Full Code Here

    ReleaseNotesBuilder createBuilder() {
        Collection<String> labelsToShowSeparately = labelToHeaderMapping.keySet();
        ImprovementSetSegregator segregator = new ImprovementSetSegregator(labelsToShowSeparately, labelsToIgnore);
        ImprovementsPrinter improvementsPrinter = new ImprovementsPrinter(segregator, labelToHeaderMapping, headerForOtherImprovements);
        if (gitHubToken == null) {
            throw new GradleException("GitHub token not provided");
        }
        return new DefaultReleaseNotesBuilder(project, gitHubToken, ignorePattern, improvementsPrinter);
    }
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

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

                zip.close();
            }
        }
        catch (Exception e)
        {
            throw new GradleException(String.format("Could not expand %s.", getDisplayName()), e);
        }
    }
View Full Code Here

                    Throwable cause = e.getCause();
                    if (cause instanceof Error)
                        throw (Error) cause;
                    if (cause instanceof RuntimeException)
                        throw (RuntimeException) cause;
                    throw new GradleException(cause.getMessage(), cause);
                }
            }

        } finally {
            executorService.shutdownNow();
View Full Code Here

                    "match", "^(\\s*)" + Pattern.quote(releaseConvention.getVersionProperty()) + "(\\s*)=(\\s*).*",
                    "replace", "\\1" + releaseConvention.getVersionProperty() + "\\2=\\3" + newVersion,
                    "byline", true));
        }
        catch (BuildException e) {
            throw new GradleException("Unable to set new version in properties file", e);
        }
    }
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.