Search in sources :

Example 1 with Configuration

use of com.tencent.tinker.build.patch.Configuration in project tinker by Tencent.

the class CliMain method loadConfigFromXml.

private void loadConfigFromXml(File configFile, File outputFile, File oldApkFile, File newApkFile) {
    if (configFile == null) {
        configFile = new File(mRunningLocation + File.separator + TypedValue.FILE_CONFIG);
        if (!configFile.exists()) {
            System.err.printf("the config file %s does not exit\n", configFile.getAbsolutePath());
            printUsage(System.err);
            System.exit(ERRNO_USAGE);
        }
    }
    try {
        config = new Configuration(configFile, outputFile, oldApkFile, newApkFile);
    } catch (IOException | ParserConfigurationException | SAXException e) {
        e.printStackTrace();
        goToError();
    } catch (TinkerPatchException e) {
        e.printStackTrace();
        goToError();
    }
}
Also used : Configuration(com.tencent.tinker.build.patch.Configuration) IOException(java.io.IOException) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) File(java.io.File) SAXException(org.xml.sax.SAXException) TinkerPatchException(com.tencent.tinker.build.util.TinkerPatchException)

Aggregations

Configuration (com.tencent.tinker.build.patch.Configuration)1 TinkerPatchException (com.tencent.tinker.build.util.TinkerPatchException)1 File (java.io.File)1 IOException (java.io.IOException)1 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)1 SAXException (org.xml.sax.SAXException)1