Java Code Examples for org.gradle.api.logging.Logging#getLogger()

The following examples show how to use org.gradle.api.logging.Logging#getLogger() . 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: AtlasExtension.java    From atlas with Apache License 2.0 6 votes vote down vote up
public AtlasExtension(@NonNull final ProjectInternal project,
                      @NonNull Instantiator instantiator,
                      @NonNull NamedDomainObjectContainer<T> buildTypes,
                      @NonNull NamedDomainObjectContainer<PatchConfig> patchConfigs,
                      @NonNull NamedDomainObjectContainer<DexConfig> dexConfigs) {

    logger = Logging.getLogger(this.getClass());
    this.project = project;

    this.patchConfigs = patchConfigs;
    this.dexConfigs = dexConfigs;
    this.buildTypes = buildTypes;
    this.multiDexConfigs = project.container(MultiDexConfig.class, new MultiDexConfigFactory(

        instantiator,project, project.getLogger()));
    this.atlasChannelConfigs = project.container(DefaultChannelConfig.class, new DefaultChannelConfigFactory(instantiator, project, project.getLogger()));
    this.enhanceConfigs = project.container(EnhanceConfig.class, new EnhanceConfigFactory(instantiator, project, project.getLogger()));
    tBuildConfig = (Z) instantiator.newInstance(TBuildConfig.class);
    manifestOptions = instantiator.newInstance(ManifestOptions.class);
    bundleConfig = instantiator.newInstance(BundleConfig.class);
}
 
Example 2
Source File: TaskManager.java    From javaide with GNU General Public License v3.0 6 votes vote down vote up
public TaskManager(
        Project project,
        AndroidBuilder androidBuilder,
        AndroidConfig extension,
        SdkHandler sdkHandler,
        DependencyManager dependencyManager,
        ToolingModelBuilderRegistry toolingRegistry) {
    this.project = project;
    this.androidBuilder = androidBuilder;
    this.sdkHandler = sdkHandler;
    this.extension = extension;
    this.toolingRegistry = toolingRegistry;
    this.dependencyManager = dependencyManager;
    logger = Logging.getLogger(this.getClass());

    globalScope = new GlobalScope(
            project,
            androidBuilder,
            checkNotNull((String) project.getProperties().get("archivesBaseName")),
            extension,
            sdkHandler,
            toolingRegistry);
}
 
Example 3
Source File: TransformReplacer.java    From atlas with Apache License 2.0 5 votes vote down vote up
public void replaceDataBindingMergeArtifactsTransform() {
    List<TransformTask> list = TransformManager.findTransformTaskByTransformType(variantContext,
            DataBindingMergeArtifactsTransform.class);
    for (TransformTask transformTask : list) {
        File outFolder =
                new File(
                        variantContext.getScope().getBuildFolderForDataBindingCompiler(),
                        DataBindingBuilder.ARTIFACT_FILES_DIR_FROM_LIBS);
        AtlasDataBindingMergeArtifactsTransform dataBindingMergeArtifactsTransform = new AtlasDataBindingMergeArtifactsTransform(variantContext, Logging.getLogger(AtlasDataBindingMergeArtifactsTransform.class), outFolder);
        ReflectUtils.updateField(transformTask, "transform", dataBindingMergeArtifactsTransform);
    }

}
 
Example 4
Source File: AtlasBaseTaskManager.java    From atlas with Apache License 2.0 5 votes vote down vote up
public AtlasBaseTaskManager(AtlasBuilder androidBuilder, T androidExtension, Project project,
                            AtlasExtension atlasExtension) {
    this.tAndroidBuilder = androidBuilder;
    this.androidExtension = androidExtension;
    this.project = project;
    this.tasks = new TaskContainerAdaptor(project.getTasks());
    this.atlasExtension = atlasExtension;
    this.logger = new LoggerWrapper(Logging.getLogger(AtlasBaseTaskManager.class));
    this.extraModelInfo = new ExtraModelInfo(new ProjectOptions(project), Logging.getLogger(AtlasBaseTaskManager.class));

    //this.dependencyManager = new DependencyManager(androidExtension, project, atlasExtension);
}
 
Example 5
Source File: ThinPexGenerator.java    From pygradle with Apache License 2.0 5 votes vote down vote up
public ThinPexGenerator(
    Project project,
    List<String> pexOptions,
    EntryPointTemplateProvider templateProvider,
    Map<String, String> extraProperties) {

    super(project, pexOptions, templateProvider, extraProperties);
    logger = Logging.getLogger(ThinPexGenerator.class);
}
 
Example 6
Source File: AbstractGradleExecuter.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
protected AbstractGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider) {
    this.distribution = distribution;
    this.testDirectoryProvider = testDirectoryProvider;
    logger = Logging.getLogger(getClass());
}
 
Example 7
Source File: AbstractGradleExecuter.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
protected AbstractGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider) {
    this.distribution = distribution;
    this.testDirectoryProvider = testDirectoryProvider;
    logger = Logging.getLogger(getClass());
}
 
Example 8
Source File: DummyRewriter.java    From android-perftracking with MIT License 4 votes vote down vote up
public DummyRewriter() {
  _log = Logging.getLogger(DummyRewriter.class.getSimpleName());
}
 
Example 9
Source File: PerformanceTrackingRewriter.java    From android-perftracking with MIT License 4 votes vote down vote up
public PerformanceTrackingRewriter() {
  _log = Logging.getLogger(PerformanceTrackingRewriter.class.getSimpleName());
}
 
Example 10
Source File: DependencyManager.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
public DependencyManager(Project project, ExtraModelInfo extraModelInfo) {
    this.project = project;
    this.extraModelInfo = extraModelInfo;
    logger = new LoggerWrapper(Logging.getLogger(DependencyManager.class));
}
 
Example 11
Source File: BaseExtension.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
BaseExtension(
        @NonNull final ProjectInternal project,
        @NonNull Instantiator instantiator,
        @NonNull AndroidBuilder androidBuilder,
        @NonNull SdkHandler sdkHandler,
        @NonNull NamedDomainObjectContainer<BuildType> buildTypes,
        @NonNull NamedDomainObjectContainer<ProductFlavor> productFlavors,
        @NonNull NamedDomainObjectContainer<SigningConfig> signingConfigs,
        @NonNull ExtraModelInfo extraModelInfo,
        final boolean isLibrary) {
    this.androidBuilder = androidBuilder;
    this.sdkHandler = sdkHandler;
    this.buildTypes = buildTypes;
    //noinspection unchecked
    this.productFlavors = (NamedDomainObjectContainer) productFlavors;
    this.signingConfigs = signingConfigs;
    this.extraModelInfo = extraModelInfo;
    this.project = project;

    logger = Logging.getLogger(this.getClass());

    defaultConfig = instantiator.newInstance(ProductFlavor.class, BuilderConstants.MAIN,
            project, instantiator, project.getLogger());

    aaptOptions = instantiator.newInstance(AaptOptions.class);
    dexOptions = instantiator.newInstance(DexOptions.class);
    lintOptions = instantiator.newInstance(LintOptions.class);
    compileOptions = instantiator.newInstance(CompileOptions.class);
    packagingOptions = instantiator.newInstance(PackagingOptions.class);
    preprocessingOptions = instantiator.newInstance(PreprocessingOptions.class);
    splits = instantiator.newInstance(Splits.class, instantiator);

    sourceSetsContainer = project.container(AndroidSourceSet.class,
            new AndroidSourceSetFactory(instantiator, project, isLibrary));

    sourceSetsContainer.whenObjectAdded(new Action<AndroidSourceSet>() {
        @Override
        public void execute(AndroidSourceSet sourceSet) {
            ConfigurationContainer configurations = project.getConfigurations();

            createConfiguration(
                    configurations,
                    sourceSet.getCompileConfigurationName(),
                    "Classpath for compiling the " + sourceSet.getName() + " sources.");

            String packageConfigDescription;
            if (isLibrary) {
                packageConfigDescription
                        = "Classpath only used when publishing '" + sourceSet.getName() + "'.";
            } else {
                packageConfigDescription
                        = "Classpath packaged with the compiled '" + sourceSet.getName() + "' classes.";
            }
            createConfiguration(
                    configurations,
                    sourceSet.getPackageConfigurationName(),
                    packageConfigDescription);

            createConfiguration(
                    configurations,
                    sourceSet.getProvidedConfigurationName(),
                    "Classpath for only compiling the " + sourceSet.getName() + " sources.");

            createConfiguration(
                    configurations,
                    sourceSet.getWearAppConfigurationName(),
                    "Link to a wear app to embed for object '" + sourceSet.getName() + "'.");

            sourceSet.setRoot(String.format("src/%s", sourceSet.getName()));
        }
    });

    sourceSetsContainer.create(defaultConfig.getName());
}
 
Example 12
Source File: AbstractGradleExecuter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
protected AbstractGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider) {
    this.distribution = distribution;
    this.testDirectoryProvider = testDirectoryProvider;
    logger = Logging.getLogger(getClass());
}
 
Example 13
Source File: AbstractGradleExecuter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
protected AbstractGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider) {
    this.distribution = distribution;
    this.testDirectoryProvider = testDirectoryProvider;
    logger = Logging.getLogger(getClass());
}