Package org.openrewrite.gradle.marker
Class GradleProject
java.lang.Object
org.openrewrite.gradle.marker.GradleProject
- All Implemented Interfaces:
Serializable,org.openrewrite.marker.Marker
Contains metadata about a Gradle Project. Queried from Gradle itself when the OpenRewrite build plugin runs.
Not automatically available on LSTs that aren't parsed through a Gradle plugin, so tests won't automatically have
access to this metadata.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfigurationsExtendingFrom(GradleDependencyConfiguration parentConfiguration, boolean transitive) List the configurations which extend from the given configuration.static GradleProjectfromToolingModel(GradleProject project) @Nullable GradleDependencyConfigurationgetConfiguration(String name) List<org.openrewrite.maven.tree.MavenRepository>withNameToConfiguration(Map<String, GradleDependencyConfiguration> nameToConfiguration) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openrewrite.marker.Marker
getId, print, withId
-
Constructor Details
-
GradleProject
public GradleProject()
-
-
Method Details
-
getMavenPluginRepositories
-
getConfiguration
-
getConfigurations
-
configurationsExtendingFrom
public List<GradleDependencyConfiguration> configurationsExtendingFrom(GradleDependencyConfiguration parentConfiguration, boolean transitive) List the configurations which extend from the given configuration. Assuming a hierarchy like:implementation |> compileClasspath |> runtimeClasspath |> testImplementation |> testCompileClasspath |> testRuntimeClasspathWhen querying "implementation" with transitive is false this function will return [compileClasspath, runtimeClasspath, testImplementation]. When transitive is true this function will also return [testCompileClasspath, testRuntimeClasspath]. -
withNameToConfiguration
public GradleProject withNameToConfiguration(Map<String, GradleDependencyConfiguration> nameToConfiguration) -
fromToolingModel
-