Skip to content

Commit

Permalink
Adjust API changes in spring-rewrite-commons
Browse files Browse the repository at this point in the history
  • Loading branch information
fabapp2 committed Jan 29, 2024
1 parent fdbecc9 commit 7f49454
Show file tree
Hide file tree
Showing 166 changed files with 278 additions and 290 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.sbm.engine.context.ProjectContext;
import org.springframework.sbm.engine.recipe.AbstractAction;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.sbm.project.resource.filter.GenericTypeListFilter;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration;
import org.springframework.rewrite.parsers.maven.MavenSettingsInitializer;
import org.springframework.rewrite.project.RewriteSourceFileWrapper;
import org.springframework.rewrite.parser.maven.MavenSettingsInitializer;
import org.springframework.rewrite.resource.RewriteSourceFileWrapper;
import org.springframework.sbm.build.impl.MavenBuildFileRefactoringFactory;
import org.springframework.sbm.build.impl.RewriteMavenParser;
import org.springframework.sbm.engine.context.ProjectContextHolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.rewrite.parsers.RewriteExecutionContext;
import org.springframework.rewrite.parser.RewriteExecutionContext;
import org.springframework.rewrite.scopes.annotations.ScanScope;

import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package org.springframework.sbm.build.api;

import org.openrewrite.maven.tree.Scope;
import org.springframework.rewrite.project.resource.ProjectResource;
import org.springframework.rewrite.resource.ProjectResource;

import java.nio.file.Path;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
import org.openrewrite.ExecutionContext;
import org.openrewrite.SourceFile;
import org.openrewrite.maven.tree.MavenResolutionResult;
import org.springframework.rewrite.project.resource.ProjectResourceSet;
import org.springframework.rewrite.project.resource.ProjectResourceSetFactory;
import org.springframework.rewrite.project.resource.RewriteMigrationResultMerger;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder;
import org.springframework.rewrite.resource.ProjectResourceSet;
import org.springframework.rewrite.resource.ProjectResourceSetFactory;
import org.springframework.rewrite.resource.RewriteMigrationResultMerger;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.finder.ProjectResourceFinder;
import org.springframework.sbm.build.impl.JavaSourceSetImpl;
import org.springframework.sbm.build.impl.MavenBuildFileUtil;
import org.springframework.sbm.build.impl.OpenRewriteMavenBuildFile;
Expand All @@ -33,7 +33,7 @@
import org.springframework.sbm.java.api.JavaSourceLocation;
import org.springframework.sbm.java.refactoring.JavaRefactoringFactory;
import org.springframework.sbm.java.util.BasePackageCalculator;
import org.springframework.rewrite.parsers.JavaParserBuilder;
import org.springframework.rewrite.parser.JavaParserBuilder;

import java.nio.file.Path;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import lombok.RequiredArgsConstructor;
import org.openrewrite.ExecutionContext;
import org.openrewrite.SourceFile;
import org.springframework.rewrite.project.resource.ProjectResourceSet;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.ProjectResourceSet;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.sbm.project.resource.StringProjectResource;

import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package org.springframework.sbm.build.api;


import org.springframework.rewrite.project.resource.ProjectResourceSet;
import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder;
import org.springframework.rewrite.resource.ProjectResourceSet;
import org.springframework.rewrite.resource.finder.ProjectResourceFinder;

public class RootBuildFileFilter implements ProjectResourceFinder<BuildFile> {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.springframework.sbm.build.filter;

import org.springframework.rewrite.project.resource.finder.GenericTypeListFinder;
import org.springframework.rewrite.resource.finder.GenericTypeListFinder;
import org.springframework.sbm.build.api.BuildFile;

public class BuildFileProjectResourceFinder extends GenericTypeListFinder<BuildFile> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
import org.openrewrite.Recipe;
import org.openrewrite.SourceFile;
import org.openrewrite.java.tree.J;
import org.springframework.rewrite.project.resource.ProjectResource;
import org.springframework.rewrite.project.resource.ProjectResourceSet;
import org.springframework.rewrite.resource.ProjectResource;
import org.springframework.rewrite.resource.ProjectResourceSet;
import org.springframework.sbm.build.api.JavaSourceSet;
import org.springframework.sbm.java.api.JavaSource;
import org.springframework.sbm.java.api.JavaSourceLocation;
import org.springframework.sbm.java.impl.OpenRewriteJavaSource;
import org.springframework.sbm.java.refactoring.JavaRefactoringFactory;
import org.springframework.sbm.java.util.BasePackageCalculator;
import org.springframework.rewrite.parsers.JavaParserBuilder;
import org.springframework.rewrite.parser.JavaParserBuilder;

import java.nio.file.Files;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import org.openrewrite.maven.MavenVisitor;
import org.openrewrite.maven.tree.MavenResolutionResult;
import org.openrewrite.xml.tree.Xml;
import org.springframework.rewrite.project.resource.ProjectResourceSet;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.support.openrewrite.GenericOpenRewriteRecipe;
import org.springframework.rewrite.resource.ProjectResourceSet;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.recipes.GenericOpenRewriteRecipe;

import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
import org.openrewrite.xml.tree.Content;
import org.openrewrite.xml.tree.Xml;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.rewrite.parsers.maven.RewriteMavenArtifactDownloader;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.support.openrewrite.GenericOpenRewriteRecipe;
import org.springframework.rewrite.parser.maven.RewriteMavenArtifactDownloader;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.recipes.GenericOpenRewriteRecipe;
import org.springframework.sbm.build.api.Dependency;
import org.springframework.sbm.build.api.Plugin;
import org.springframework.sbm.build.api.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.openrewrite.maven.internal.MavenXmlMapper;
import org.openrewrite.xml.tree.Xml;
import org.openrewrite.xml.tree.Xml.Document;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.sbm.build.api.Plugin;

import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.openrewrite.SourceFile;
import org.openrewrite.internal.lang.Nullable;
import org.openrewrite.maven.MavenParser;
import org.springframework.rewrite.parsers.maven.MavenSettingsInitializer;
import org.springframework.rewrite.parser.maven.MavenSettingsInitializer;
import org.springframework.stereotype.Component;

import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.openrewrite.Parser;
import org.openrewrite.SourceFile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.rewrite.parsers.maven.RewriteMavenArtifactDownloader;
import org.springframework.rewrite.parser.maven.RewriteMavenArtifactDownloader;
import org.springframework.sbm.build.impl.MavenBuildFileRefactoringFactory;
import org.springframework.sbm.build.impl.OpenRewriteMavenBuildFile;
import org.springframework.sbm.build.impl.RewriteMavenParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import org.openrewrite.xml.tree.Xml;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.core.annotation.Order;
import org.springframework.rewrite.parsers.maven.RewriteMavenArtifactDownloader;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.parser.maven.RewriteMavenArtifactDownloader;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.sbm.build.impl.MavenBuildFileRefactoring;
import org.springframework.sbm.build.impl.MavenBuildFileRefactoringFactory;
import org.springframework.sbm.build.impl.OpenRewriteMavenBuildFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.springframework.sbm.common.api.TextResource;

import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.openrewrite.text.PlainText;

import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package org.springframework.sbm.common.migration.actions;

import lombok.Setter;
import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder;
import org.springframework.rewrite.resource.finder.PathPatternMatchingProjectResourceFinder;
import org.springframework.sbm.engine.context.ProjectContext;
import org.springframework.sbm.engine.recipe.AbstractAction;
import org.springframework.rewrite.project.resource.ProjectResource;
import org.springframework.rewrite.resource.ProjectResource;

/**
* Delete files matching path pattern.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.sbm.common.migration.actions;

import org.springframework.rewrite.project.resource.ProjectResource;
import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder;
import org.springframework.rewrite.resource.ProjectResource;
import org.springframework.rewrite.resource.finder.PathPatternMatchingProjectResourceFinder;
import org.springframework.sbm.engine.recipe.AbstractAction;
import org.springframework.sbm.engine.context.ProjectContext;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package org.springframework.sbm.engine.commands;

import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.rewrite.project.resource.finder.DeletedResourcePathStringFilter;
import org.springframework.rewrite.project.resource.finder.ModifiedResourcePathStringFilter;
import org.springframework.rewrite.resource.finder.DeletedResourcePathStringFilter;
import org.springframework.rewrite.resource.finder.ModifiedResourcePathStringFilter;
import org.springframework.rewrite.scopes.ExecutionScope;
import org.springframework.sbm.engine.context.ProjectContext;
import org.springframework.sbm.engine.context.ProjectContextSerializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.sbm.engine.commands;

import org.springframework.rewrite.project.resource.finder.DeletedResourcePathStringFilter;
import org.springframework.rewrite.project.resource.finder.ModifiedResourcePathStringFilter;
import org.springframework.rewrite.resource.finder.DeletedResourcePathStringFilter;
import org.springframework.rewrite.resource.finder.ModifiedResourcePathStringFilter;
import org.springframework.sbm.engine.git.GitSupport;
import org.springframework.sbm.engine.git.ProjectSyncVerifier;
import org.springframework.sbm.engine.recipe.Recipe;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.core.io.Resource;
import org.springframework.rewrite.parsers.ProjectScanner;
import org.springframework.rewrite.parser.ProjectScanner;
import org.springframework.sbm.engine.context.ProjectContext;
import org.springframework.sbm.engine.context.ProjectRootPathResolver;
import org.springframework.sbm.engine.precondition.PreconditionVerificationResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import org.openrewrite.RecipeRun;
import org.openrewrite.SourceFile;
import org.openrewrite.internal.InMemoryLargeSourceSet;
import org.springframework.rewrite.project.resource.ProjectResourceSet;
import org.springframework.rewrite.project.resource.ProjectResourceSetFactory;
import org.springframework.rewrite.project.resource.RewriteMigrationResultMerger;
import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.ProjectResourceSet;
import org.springframework.rewrite.resource.ProjectResourceSetFactory;
import org.springframework.rewrite.resource.RewriteMigrationResultMerger;
import org.springframework.rewrite.resource.finder.ProjectResourceFinder;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.sbm.build.api.ApplicationModules;
import org.springframework.sbm.build.api.BuildFile;
import org.springframework.sbm.build.api.Module;
Expand All @@ -36,7 +36,7 @@
import org.springframework.sbm.java.impl.ProjectJavaSourcesImpl;
import org.springframework.sbm.java.refactoring.JavaRefactoringFactory;
import org.springframework.sbm.java.util.BasePackageCalculator;
import org.springframework.rewrite.parsers.JavaParserBuilder;
import org.springframework.rewrite.parser.JavaParserBuilder;

import java.nio.file.Path;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
package org.springframework.sbm.engine.context;

import org.openrewrite.ExecutionContext;
import org.springframework.rewrite.project.resource.ProjectResourceSet;
import org.springframework.rewrite.project.resource.ProjectResourceSetFactory;
import org.springframework.rewrite.project.resource.RewriteMigrationResultMerger;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.ProjectResourceSet;
import org.springframework.rewrite.resource.ProjectResourceSetFactory;
import org.springframework.rewrite.resource.RewriteMigrationResultMerger;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.sbm.build.api.BuildFile;
import org.springframework.sbm.build.filter.BuildFileProjectResourceFinder;
import org.springframework.sbm.java.impl.ClasspathRegistry;
import org.springframework.sbm.java.refactoring.JavaRefactoringFactory;
import org.springframework.sbm.java.util.BasePackageCalculator;
import org.springframework.rewrite.parsers.JavaParserBuilder;
import org.springframework.rewrite.parser.JavaParserBuilder;
import org.springframework.sbm.project.resource.*;
import lombok.RequiredArgsConstructor;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package org.springframework.sbm.engine.context;

import lombok.RequiredArgsConstructor;
import org.springframework.rewrite.project.resource.ProjectResourceSetSerializer;
import org.springframework.rewrite.resource.ProjectResourceSetSerializer;
import org.springframework.stereotype.Component;

@Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import lombok.RequiredArgsConstructor;
import org.openrewrite.Result;
import org.springframework.rewrite.project.resource.RewriteMigrationResultMerger;
import org.springframework.rewrite.resource.RewriteMigrationResultMerger;
import org.springframework.sbm.engine.context.ProjectContext;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
package org.springframework.sbm.engine.recipe;

import org.openrewrite.SourceFile;
import org.springframework.rewrite.project.resource.ProjectResourceSet;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder;
import org.springframework.rewrite.resource.ProjectResourceSet;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.finder.ProjectResourceFinder;

import java.util.List;
import java.util.stream.Collectors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
package org.springframework.sbm.java;

import org.openrewrite.ExecutionContext;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.sbm.java.impl.OpenRewriteJavaSource;
import org.springframework.sbm.java.refactoring.JavaRefactoring;
import org.springframework.sbm.java.refactoring.JavaRefactoringFactory;
import org.springframework.rewrite.parsers.JavaParserBuilder;
import org.springframework.rewrite.parser.JavaParserBuilder;
import org.springframework.sbm.project.resource.ProjectResourceWrapper;
import lombok.RequiredArgsConstructor;
import org.openrewrite.SourceFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.sbm.java.api;

import org.springframework.rewrite.project.resource.ProjectResource;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.ProjectResource;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;
import org.springframework.sbm.java.impl.StaticFieldAccessTransformer;
import org.openrewrite.Recipe;
import org.openrewrite.java.tree.J;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import org.openrewrite.Recipe;
import org.openrewrite.java.tree.J;
import org.springframework.rewrite.project.resource.RewriteSourceFileHolder;
import org.springframework.rewrite.resource.RewriteSourceFileHolder;

import java.util.List;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.sbm.java.filter;

import org.springframework.rewrite.project.resource.ProjectResourceSet;
import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder;
import org.springframework.rewrite.resource.ProjectResourceSet;
import org.springframework.rewrite.resource.finder.ProjectResourceFinder;
import org.springframework.sbm.java.api.JavaSourceAndType;
import org.springframework.sbm.java.impl.OpenRewriteJavaSource;
import org.springframework.sbm.java.impl.OpenRewriteType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.springframework.sbm.java.filter;

import org.springframework.rewrite.project.resource.finder.GenericTypeListFinder;
import org.springframework.rewrite.resource.finder.GenericTypeListFinder;
import org.springframework.sbm.java.api.JavaSource;

public class JavaSourceListFinder extends GenericTypeListFinder<JavaSource> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.springframework.sbm.java.filter;

import org.springframework.rewrite.project.resource.finder.GenericTypeListFinder;
import org.springframework.rewrite.resource.finder.GenericTypeListFinder;
import org.springframework.sbm.java.impl.OpenRewriteJavaSource;

public class OpenRewriteJavaSourceListFinder extends GenericTypeListFinder<OpenRewriteJavaSource> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.openrewrite.maven.cache.LocalMavenArtifactCache;
import org.openrewrite.maven.tree.ResolvedDependency;
import org.openrewrite.maven.tree.Scope;
import org.springframework.rewrite.parsers.maven.RewriteMavenArtifactDownloader;
import org.springframework.rewrite.parser.maven.RewriteMavenArtifactDownloader;
import org.springframework.sbm.build.api.BuildFile;
import org.springframework.sbm.build.impl.OpenRewriteMavenBuildFile;
import org.springframework.sbm.project.parser.DependencyHelper;
Expand Down
Loading

0 comments on commit 7f49454

Please sign in to comment.