com.android.build.api.transform.TransformException Java Examples

The following examples show how to use com.android.build.api.transform.TransformException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractTransform.java    From SocialSdkLibrary with Apache License 2.0 6 votes vote down vote up
@Override
public void transform(TransformInvocation transformInvocation) throws TransformException, InterruptedException, IOException {
    super.transform(transformInvocation);
    UtilX.log("start transform");
    long startTime = System.currentTimeMillis();
    // 获取输入
    Collection<TransformInput> inputs = transformInvocation.getInputs();
    final TransformOutputProvider outputProvider = transformInvocation.getOutputProvider();
    // 删除之前的输出
    if (outputProvider != null) {
        outputProvider.deleteAll();
    }
    for (TransformInput transformInput : inputs) {
        for (DirectoryInput directoryInput : transformInput.getDirectoryInputs()) {
            onEachDirectory(directoryInput, outputProvider);
        }
        for (JarInput jarInput : transformInput.getJarInputs()) {
            onEachJar(jarInput, outputProvider);
        }
    }
    long endTime = System.currentTimeMillis();
    UtilX.log("end transform cost time " + (endTime - startTime) / 1000 + " s");
}
 
Example #2
Source File: ApplicationTransform.java    From EasyRouter with Apache License 2.0 5 votes vote down vote up
@Override
public void transform(TransformInvocation transformInvocation) throws TransformException, InterruptedException, IOException {
    TransformContext context = new TransformContext(transformInvocation);

    CollectEngine collectEngine = new CollectEngine(context);
    MergeInfo mergeInfo = collectEngine.startCollect();

    Log.i("merinfo size: " + mergeInfo.toString());
    MergeEngine mergeEngine = new MergeEngine(context);
    mergeEngine.startMerge(mergeInfo);
}
 
Example #3
Source File: DataLoaderTransform.java    From DataLoader with Apache License 2.0 4 votes vote down vote up
@Override
public void transform(TransformInvocation transformInvocation) throws TransformException, InterruptedException, IOException {
    super.transform(transformInvocation);
    process(transformInvocation);
    copyInputToOutput(transformInvocation);
}
 
Example #4
Source File: TaobaoInstantRunDependenciesApkBuilder.java    From atlas with Apache License 2.0 4 votes vote down vote up
@Override
public void transform(TransformInvocation transformInvocation) throws TransformException, InterruptedException, IOException {
    super.transform(transformInvocation);
}
 
Example #5
Source File: TaobaoInstantRunSlicer.java    From atlas with Apache License 2.0 4 votes vote down vote up
@Override
public void transform(TransformInvocation transformInvocation) throws IOException, TransformException, InterruptedException {
    super.transform(transformInvocation);
}
 
Example #6
Source File: LibraryTransform.java    From EasyRouter with Apache License 2.0 4 votes vote down vote up
@Override
public void transform(TransformInvocation transformInvocation) throws TransformException, InterruptedException, IOException {
    TransformContext context = new TransformContext(transformInvocation);
    RenameEngine engine = new RenameEngine(context);
    engine.stratRename(project);
}