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

com.liferay.gradle.plugins.service.builder.internal.util.GradleUtil Maven / Gradle / Ivy

Go to download

The Service Builder Gradle plugin lets you generate a Liferay service layer defined in a Service Builder service.xml file.

There is a newer version: 4.0.167
Show newest version
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */

package com.liferay.gradle.plugins.service.builder.internal.util;

import java.util.Set;

import org.gradle.api.Project;

/**
 * @author Peter Shin
 */
public class GradleUtil extends com.liferay.gradle.util.GradleUtil {

	public static Project findProject(Project rootProject, String name) {
		for (Project project : rootProject.getAllprojects()) {
			if (name.equals(project.getName())) {
				Set subprojects = project.getSubprojects();

				if (subprojects.isEmpty()) {
					return project;
				}
			}
		}

		return null;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy