Java Code Examples for com.android.build.gradle.internal.publishing.AndroidArtifacts#ArtifactType

The following examples show how to use com.android.build.gradle.internal.publishing.AndroidArtifacts#ArtifactType . 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: AppendMainArtifactsCollection.java    From atlas with Apache License 2.0 4 votes vote down vote up
public AppendMainArtifactsCollection(Project project, ArtifactCollection artifactResults, AwbBundle awbBundle, AndroidArtifacts.ArtifactType artifactType) {
    this.artifactResults = artifactResults;
    this.awbBundle = awbBundle;
    this.project = project;
    this.artifactType = artifactType;
}
 
Example 2
Source File: AppendMainArtifactsCollection.java    From atlas with Apache License 2.0 4 votes vote down vote up
public AppendMainArtifactsCollection(Project project, FileCollection filesResults, AwbBundle awbBundle, AndroidArtifacts.ArtifactType artifactType) {
    this.filesResults = filesResults;
    this.awbBundle = awbBundle;
    this.project = project;
    this.artifactType = artifactType;
}
 
Example 3
Source File: AtlasConfigurationHelper.java    From atlas with Apache License 2.0 4 votes vote down vote up
public void registAtlasStreams() {

        DependencyHandler dependencyHandler = project.getDependencies();

        final String explodedAwbType = AtlasAndroidArtifacts.TYPE_EXPLODED_AWB;

        final String explodedApType = AtlasAndroidArtifacts.TYPE_EXPLODED_AP;

        final String explodedSolibType = AtlasAndroidArtifacts.TYPE_EXPLODED_SOLIB;

        dependencyHandler.registerTransform(
                reg -> {
                    reg.getFrom().attribute(ARTIFACT_FORMAT, AtlasAndroidArtifacts.TYPE_AWB);
                    reg.getTo().attribute(ARTIFACT_FORMAT, explodedAwbType);
                    reg.artifactTransform(ExtractAwbTransform.class);
                });

        for (AndroidArtifacts.ArtifactType transformTarget : AarTransform.getTransformTargets()) {
            dependencyHandler.registerTransform(
                    reg -> {
                        reg.getFrom().attribute(ARTIFACT_FORMAT, explodedAwbType);
                        reg.getTo().attribute(ARTIFACT_FORMAT, transformTarget.getType());
                        reg.artifactTransform(
                                AarTransform.class, config -> config.params(transformTarget));
                    });
        }

        dependencyHandler.registerTransform(
                reg -> {
                    reg.getFrom().attribute(ARTIFACT_FORMAT, explodedAwbType);
                    reg.getTo()
                            .attribute(
                                    ARTIFACT_FORMAT,
                                    AndroidArtifacts.ArtifactType.SYMBOL_LIST_WITH_PACKAGE_NAME.getType());
                    reg.artifactTransform(LibrarySymbolTableTransform.class);
                });
        dependencyHandler.registerTransform(

                reg -> {
                    reg.getFrom().attribute(ARTIFACT_FORMAT, AtlasAndroidArtifacts.TYPE_AP);
                    reg.getTo().attribute(ARTIFACT_FORMAT, explodedApType);
                    reg.artifactTransform(ExtractApTransform.class);
                });

        dependencyHandler.registerTransform(
                reg -> {
                    reg.getFrom().attribute(ARTIFACT_FORMAT, AtlasAndroidArtifacts.TYPE_SOLIB);
                    reg.getTo().attribute(ARTIFACT_FORMAT, explodedSolibType);
                    reg.artifactTransform(ExtractSolibTransform.class);
                });

        dependencyHandler.registerTransform(
                reg -> {
                    reg.getFrom().attribute(ARTIFACT_FORMAT, explodedSolibType);
                    reg.getTo().attribute(ARTIFACT_FORMAT, AndroidArtifacts.ArtifactType.JNI.getType());
                    reg.artifactTransform(LoadSolibTransform.class);
                });

        dependencyHandler.registerTransform(
                reg -> {
                    reg.getFrom().attribute(ARTIFACT_FORMAT, explodedAwbType);
                    reg.getTo().attribute(ARTIFACT_FORMAT, AtlasAndroidArtifacts.TYPE_LIBS);
                    reg.artifactTransform(LoadSolibFromLibsTransform.class);
                }
        );

        dependencyHandler.registerTransform(
                reg -> {
                    reg.getFrom().attribute(ARTIFACT_FORMAT, AtlasAndroidArtifacts.AtlasArtifactType.EXPLODED_AAR.getType());
                    reg.getTo().attribute(ARTIFACT_FORMAT, AtlasAndroidArtifacts.TYPE_LIBS);
                    reg.artifactTransform(LoadSolibFromLibsTransform.class);
                }
        );


    }