本文整理了Java中org.gradle.api.Project.findProject()
方法的一些代码示例,展示了Project.findProject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.findProject()
方法的具体详情如下:
包路径:org.gradle.api.Project
类名称:Project
方法名:findProject
暂无
代码示例来源:origin: gradle.plugin.com.prezi.pride/gradle-pride-plugin
private static Project findRelativeProjectInternal(Project parent, String path) {
if (path.isEmpty()) {
return parent;
}
if (path.startsWith(":")) {
return findRelativeProjectInternal(parent.getParent(), path.substring(1));
}
return parent.findProject(path);
}
代码示例来源:origin: prezi/pride
private static Project findRelativeProjectInternal(Project parent, String path) {
if (path.isEmpty()) {
return parent;
}
if (path.startsWith(":")) {
return findRelativeProjectInternal(parent.getParent(), path.substring(1));
}
return parent.findProject(path);
}
代码示例来源:origin: me.seeber.gradle/gradle-project-config
Project annotationsProject = getProject().getRootProject().findProject(annotationsProjectName);
代码示例来源:origin: com.android.tools.build/gradle-core
@Nullable
private Project getProject(
@NonNull LintGradleClient client,
@NonNull String name,
@NonNull org.gradle.api.Project gradleProject,
@NonNull String variantName) {
Project cached = namedProjects.get(name);
if (cached != null) {
// TODO: Are names unique across siblings?
return cached;
}
org.gradle.api.Project namedProject = gradleProject.findProject(name);
if (namedProject != null) {
Project project = getProject(client, namedProject, variantName);
if (project != null) {
namedProjects.put(name, project);
return project;
}
}
return null;
}
代码示例来源:origin: gradle.plugin.me.seeber.gradle/gradle-project-config
Project annotationsProject = getProject().getRootProject().findProject(annotationsProjectName);
代码示例来源:origin: com.palantir.gradle.conjure/gradle-conjure
Set<String> javaProjectSuffixes = ImmutableSet.of(
JAVA_OBJECTS_SUFFIX, JAVA_JERSEY_SUFFIX, JAVA_RETROFIT_SUFFIX);
if (javaProjectSuffixes.stream().anyMatch(suffix -> project.findProject(project.getName() + suffix) != null)) {
Configuration conjureJavaConfig = project.getConfigurations().maybeCreate(CONJURE_JAVA);
File conjureJavaDir = new File(project.getBuildDir(), CONJURE_JAVA);
代码示例来源:origin: com.palantir.gradle.conjure/gradle-conjure
private void setupConjurePython(
Project project,
Supplier<GeneratorOptions> optionsSupplier,
Configuration conjureIrConfiguration,
Task generateConjure) {
Project subproj = project.findProject(PYTHON_PROJECT_NAME);
if (subproj == null) {
return;
}
Configuration conjurePythonConfig = project.getConfigurations().maybeCreate(ConjurePlugin.CONJURE_PYTHON);
File conjurePythonDir = new File(project.getBuildDir(), ConjurePlugin.CONJURE_PYTHON);
project.getDependencies().add(ConjurePlugin.CONJURE_PYTHON, ConjurePlugin.CONJURE_PYTHON_BINARY);
ExtractExecutableTask extractConjurePythonTask = ExtractExecutableTask.createExtractTask(
project,
"extractConjurePython",
conjurePythonConfig,
conjurePythonDir,
"conjure-python");
project.getTasks().create("generatePython", ConjureLocalGenerateTask.class, task -> {
task.setDescription("Generates Python files from remote Conjure definitions.");
task.setGroup(ConjurePlugin.TASK_GROUP);
task.setSource(conjureIrConfiguration);
task.setExecutablePath(extractConjurePythonTask::getExecutable);
task.setOutputDirectory(subproj.file("python"));
task.setOptions(() -> optionsSupplier.get().addFlag("rawSource"));
task.dependsOn(extractConjurePythonTask);
generateConjure.dependsOn(task);
});
}
代码示例来源:origin: com.palantir.gradle.conjure/gradle-conjure
Configuration conjureIrConfiguration,
Task generateConjure) {
Project subproj = project.findProject(TYPESCRIPT_PROJECT_NAME);
if (subproj == null) {
return;
代码示例来源:origin: com.palantir.gradle.conjure/gradle-conjure
private static void setupConjurePythonProject(
Project project, Supplier<GeneratorOptions> options, Task compileConjure, Task compileIrTask) {
String pythonProjectName = project.getName() + "-python";
if (project.findProject(pythonProjectName) != null) {
Configuration conjurePythonConfig = project.getConfigurations().maybeCreate(CONJURE_PYTHON);
代码示例来源:origin: com.palantir.gradle.conjure/gradle-conjure
if (project.findProject(retrofitProjectName) != null) {
String objectsProjectName = project.getName() + JAVA_OBJECTS_SUFFIX;
if (project.findProject(objectsProjectName) == null) {
throw new IllegalStateException(
String.format("Cannot enable '%s' without '%s'", retrofitProjectName, objectsProjectName));
Task cleanTask = project.getTasks().findByName(TASK_CLEAN);
cleanTask.dependsOn(project.getTasks().findByName("cleanCompileConjureRetrofit"));
subproj.getDependencies().add("compile", project.findProject(objectsProjectName));
subproj.getDependencies().add("compile", "com.squareup.retrofit2:retrofit");
subproj.getDependencies().add("compileOnly", "javax.annotation:javax.annotation-api");
代码示例来源:origin: com.palantir.gradle.conjure/gradle-conjure
if (project.findProject(jerseyProjectName) != null) {
String objectsProjectName = project.getName() + JAVA_OBJECTS_SUFFIX;
if (project.findProject(objectsProjectName) == null) {
throw new IllegalStateException(
String.format("Cannot enable '%s' without '%s'", jerseyProjectName, objectsProjectName));
Task cleanTask = project.getTasks().findByName(TASK_CLEAN);
cleanTask.dependsOn(project.getTasks().findByName("cleanCompileConjureJersey"));
subproj.getDependencies().add("compile", project.findProject(objectsProjectName));
subproj.getDependencies().add("compile", "javax.ws.rs:javax.ws.rs-api");
subproj.getDependencies().add("compileOnly", "javax.annotation:javax.annotation-api");
代码示例来源:origin: com.palantir.gradle.conjure/gradle-conjure
GenerateConjureServiceDependenciesTask productDependencyTask) {
String typescriptProjectName = project.getName() + "-typescript";
if (project.findProject(typescriptProjectName) != null) {
Configuration conjureTypeScriptConfig = project.getConfigurations().maybeCreate(CONJURE_TYPESCRIPT);
project.project(typescriptProjectName, subproj -> {
代码示例来源:origin: com.palantir.gradle.conjure/gradle-conjure
if (project.findProject(objectsProjectName) != null) {
project.project(objectsProjectName, subproj -> {
subproj.getPluginManager().apply(JavaPlugin.class);
代码示例来源:origin: com.android.tools.build/gradle-core
subProject = project.findProject(gradlePath);
Project subProject = project.findProject(gradlePath);
File stagingDir = FileUtils.join(
subProject.getBuildDir(),
内容来源于网络,如有侵权,请联系作者删除!