All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.faker.android.gradle.FakerAndroidAppPlugin.groovy Maven / Gradle / Ivy

The newest version!
package com.faker.android.gradle
import android.databinding.tool.DataBindingBuilder
import com.android.annotations.NonNull
import com.android.build.gradle.AbstractAppPlugin
import com.android.build.gradle.AndroidConfig
import com.android.build.gradle.AppExtension
import com.android.build.gradle.internal.SdkHandler
import com.android.build.gradle.internal.TaskManager
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import com.android.build.gradle.internal.scope.GlobalScope
import com.android.build.gradle.internal.variant.VariantFactory
import com.android.build.gradle.options.ProjectOptions
import com.android.builder.profile.Recorder
import org.gradle.api.Project
import org.gradle.tooling.provider.model.ToolingModelBuilderRegistry
import javax.inject.Inject

class FakerAndroidAppPlugin extends AbstractAppPlugin {

    @Inject
    public FakerAndroidAppPlugin(ToolingModelBuilderRegistry registry) {
        super(registry, true /*isBaseApplication*/);
    }

    @Override
    protected void pluginSpecificApply(@NonNull Project project) {
    }

    @Override
    @NonNull
    protected Class getExtensionClass() {
        return FakerBaseAppModuleExtension.class;
    }

    @NonNull
    @Override
    protected TaskManager createTaskManager(
            @NonNull GlobalScope globalScope,
            @NonNull Project project,
            @NonNull ProjectOptions projectOptions,
            @NonNull DataBindingBuilder dataBindingBuilder,
            @NonNull AndroidConfig androidConfig,
            @NonNull SdkHandler sdkHandler,
            @NonNull VariantFactory variantFactory,
            @NonNull ToolingModelBuilderRegistry toolingRegistry,
            @NonNull Recorder recorder) {
        return new FakerApplicationTaskManager(
                globalScope,
                project,
                projectOptions,
                dataBindingBuilder,
                androidConfig,
                sdkHandler,
                variantFactory,
                toolingRegistry,
                recorder);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy