com.android.build.gradle.internal.PostCompilationData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-core Show documentation
Show all versions of gradle-core Show documentation
Core library to build Android Gradle plugin.
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.build.gradle.internal;
import com.android.annotations.NonNull;
import com.android.annotations.Nullable;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.Callables;
import java.io.File;
import java.util.List;
import java.util.concurrent.Callable;
/**
* Class to hold data to setup the many optional post-compilation steps.
*/
public class PostCompilationData {
@Nullable
private List> classGeneratingTasks;
@Nullable
private List> libraryGeneratingTasks;
@Nullable
private Callable> inputFiles;
@Nullable
private Callable inputDir;
@Nullable
private Callable javaResourcesInputDir;
@Nullable
private Callable> inputLibraries;
@NonNull
public List> getClassGeneratingTasks() {
Preconditions.checkState(classGeneratingTasks != null);
return classGeneratingTasks;
}
public void setClassGeneratingTasks(@NonNull List> classGeneratingTasks) {
this.classGeneratingTasks = classGeneratingTasks;
}
@NonNull
public List> getLibraryGeneratingTasks() {
Preconditions.checkState(libraryGeneratingTasks != null);
return libraryGeneratingTasks;
}
public void setLibraryGeneratingTasks(@NonNull List> libraryGeneratingTasks) {
this.libraryGeneratingTasks = libraryGeneratingTasks;
}
@Nullable
public Callable> getInputFilesCallable() {
return inputFiles;
}
public void setInputFiles(@Nullable List inputFiles) {
this.inputFiles = Callables.returning(inputFiles);
}
public void setInputFilesCallable(@Nullable Callable> inputFiles) {
this.inputFiles = inputFiles;
}
@Nullable
public Callable getInputDirCallable() {
return inputDir;
}
public void setInputDir(@NonNull File inputDir) {
this.inputDir = Callables.returning(inputDir);
}
public void setInputDirCallable(@Nullable Callable inputDir) {
this.inputDir = inputDir;
}
@Nullable
public Callable getJavaResourcesInputDirCallable() {
return javaResourcesInputDir;
}
public void setJavaResourcesInputDir(@NonNull File javaResourcesInputDir) {
this.javaResourcesInputDir = Callables.returning(javaResourcesInputDir);
}
public void setJavaResourcesInputDirCallable(@Nullable Callable javaResourcesInputDir) {
this.javaResourcesInputDir = javaResourcesInputDir;
}
@Nullable
public Callable> getInputLibrariesCallable() {
return inputLibraries;
}
public void setInputLibraries(@NonNull List inputLibraries) {
this.inputLibraries = Callables.returning(inputLibraries);
}
public void setInputLibrariesCallable(@Nullable Callable> inputLibraries) {
this.inputLibraries = inputLibraries;
}
}