private void addResourcesFromFolder( ApkBuilder builder,  File folder )
            throws SealedApkException, DuplicateFileException, ApkCreationException, IOException {
    """
	Adds all non-class files from folder, so that we can add META-INF/services resources.
    """
        final int folderPathLength = folder.getCanonicalPath().length();

        final List<File> resourceFiles = new ArrayList<>(  );
        collectFiles( folder, resourceFiles );

        for ( final File resourceFile : resourceFiles )
        {
            final String resourceName = resourceFile
                    .getCanonicalPath()
                    .substring( folderPathLength + 1 )
                    .replaceAll( "\\\\", "/" );
            getLog().info( "Adding resource " + resourceFile + " : " + resourceName );
            builder.addFile( resourceFile,  resourceName );
        }
    }
private void addResourcesFromFolder( ApkBuilder builder,  File folder )
            throws SealedApkException, DuplicateFileException, ApkCreationException, IOException
    {
        final int folderPathLength = folder.getCanonicalPath().length();

        final List<File> resourceFiles = new ArrayList<>(  );
        collectFiles( folder, resourceFiles );

        for ( final File resourceFile : resourceFiles )
        {
            final String resourceName = resourceFile
                    .getCanonicalPath()
                    .substring( folderPathLength + 1 )
                    .replaceAll( "\\\\", "/" );
            getLog().info( "Adding resource " + resourceFile + " : " + resourceName );
            builder.addFile( resourceFile,  resourceName );
        }
    }
private void addResourcesFromFolder ( ApkBuilder builder , File folder ) throws SealedApkException , DuplicateFileException , ApkCreationException , IOException { final int folderPathLength = folder . getCanonicalPath ( ) . length ( ) ; final List < File > resourceFiles = new ArrayList <> ( ) ; collectFiles ( folder , resourceFiles ) ; for ( final File resourceFile : resourceFiles ) { final String resourceName = resourceFile . getCanonicalPath ( ) . substring ( folderPathLength + 1 ) . replaceAll ( "\\\\" , "/" ) ; getLog ( ) . info ( "Adding resource " + resourceFile + " : " + resourceName ) ; builder . addFile ( resourceFile , resourceName ) ; } }
Adds all non-class files from folder, so that we can add META-INF/services resources.
Adds all non - class files from folder so that we can add META - INF / services resources .