Skip to content

Commit 39e24f5

Browse files
committed
feat(provider): add Spring Cloud detection in Gradle projects #338
- Implement Spring Cloud framework detection in SpringGradleContextProvider - Add logic to identify Spring Cloud dependencies and versions - Update TechStack with Spring Cloud information when detected
1 parent 066d9c8 commit 39e24f5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

java/src/main/kotlin/cc/unitmesh/idea/provider/SpringGradleContextProvider.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,21 @@ fun convertTechStack(project: Project): TechStack {
7777
val techStack = TechStack()
7878
var hasMatchSpringMvc = false
7979
var hasMatchSpringData = false
80+
var hasMatchSpringCloud = false
8081

8182
libraryDataList?.forEach {
8283
val name = it.groupId + ":" + it.artifactId
83-
// sprint boot start with version
8484
if (name.startsWith("org.springframework.boot")) {
8585
techStack.coreFrameworks.putIfAbsent("Spring Boot " + it.version, true)
8686
}
8787

88+
if (!hasMatchSpringCloud) {
89+
if (name.startsWith("org.springframework.cloud")) {
90+
techStack.coreFrameworks.putIfAbsent("Spring Cloud " + it.version, true)
91+
hasMatchSpringCloud = true
92+
}
93+
}
94+
8895
if (!hasMatchSpringMvc) {
8996
SpringLibrary.SPRING_MVC.forEach { entry: LibraryDescriptor ->
9097
if (name.contains(entry.coords)) {

0 commit comments

Comments
 (0)