-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gradle Project Parser independent of Rewrite via GradleProjectData
- Loading branch information
Showing
25 changed files
with
698 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ build/ | |
.gradle/ | ||
out/ | ||
.idea/ | ||
/spring-petclinic/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
org.gradle.caching=true | ||
org.gradle.parallel=true | ||
git.root=/Users/aboyko/git/spring-boot-migrator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
plugins { | ||
id("org.openrewrite.build.language-library") | ||
} | ||
|
||
group = "org.springframework.sbm.gradle.tooling" | ||
|
||
repositories { | ||
if (!project.hasProperty("releasing")) { | ||
mavenLocal { | ||
mavenContent { | ||
excludeVersionByRegex(".+", ".+", ".+-rc-?[0-9]*") | ||
} | ||
} | ||
|
||
maven { | ||
url = uri("https://oss.sonatype.org/content/repositories/snapshots") | ||
} | ||
} | ||
|
||
mavenCentral { | ||
mavenContent { | ||
excludeVersionByRegex(".+", ".+", ".+-rc-?[0-9]*") | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(project(":model")) | ||
implementation("org.openrewrite:rewrite-core:latest.integration") | ||
implementation("org.openrewrite:rewrite-gradle:latest.integration") | ||
implementation("org.openrewrite.gradle.tooling:model:latest.integration") | ||
implementation("org.openrewrite:rewrite-groovy:latest.integration") | ||
implementation("org.openrewrite:rewrite-hcl:latest.integration") | ||
implementation("org.openrewrite:rewrite-java:latest.integration") | ||
implementation("org.openrewrite:rewrite-json:latest.integration") | ||
implementation("org.openrewrite:rewrite-kotlin:latest.integration") | ||
implementation("org.openrewrite:rewrite-python:latest.integration") | ||
implementation("org.openrewrite:rewrite-properties:latest.integration") | ||
implementation("org.openrewrite:rewrite-protobuf:latest.integration") | ||
implementation("org.openrewrite:rewrite-xml:latest.integration") | ||
implementation("org.openrewrite:rewrite-yaml:latest.integration") | ||
implementation("org.openrewrite.recipe:rewrite-all:latest.integration") | ||
implementation(gradleApi()) | ||
implementation("org.openrewrite.gradle.tooling:model:latest.integration") | ||
} |
66 changes: 66 additions & 0 deletions
66
...model/parser/src/main/java/org/springframework/sbm/gradle/parser/DefaultParserConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright 2023 the original author or authors. | ||
* <p> | ||
* 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 | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* 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 org.springframework.sbm.gradle.parser; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public class DefaultParserConfig implements ParseConfig { | ||
|
||
private final List<String> exclusions = new ArrayList<>(); | ||
private final List<String> plainTextMasks = new ArrayList<>(); | ||
|
||
private int sizeThresholdMb = 10; | ||
|
||
@Override | ||
public List<String> getPlainTextMasks() { | ||
if (plainTextMasks.isEmpty()) { | ||
plainTextMasks.addAll(Arrays.asList( | ||
"**gradlew", | ||
"**META-INF/services/**", | ||
"**/META-INF/spring.factories", | ||
"**/META-INF/spring/**", | ||
"**.gitignore", | ||
"**.gitattributes", | ||
"**.java-version", | ||
"**.sdkmanrc", | ||
"**.sh", | ||
"**.bash", | ||
"**.bat", | ||
"**.ksh", | ||
"**.txt", | ||
"**.jsp", | ||
"**.sql", | ||
"**Dockerfile", | ||
"**Jenkinsfile", | ||
"**.kts" | ||
)); | ||
} | ||
return plainTextMasks; | ||
} | ||
|
||
@Override | ||
public List<String> getExclusions() { | ||
return exclusions; | ||
} | ||
|
||
@Override | ||
public int getSizeThresholdMb() { | ||
return sizeThresholdMb; | ||
} | ||
|
||
} |
Oops, something went wrong.