Skip to content

Commit c84d0f0

Browse files
Merge pull request #21 from adityabhaskar/ab/fix_api_dependency_bug
Fix issue with incorrect api detection
2 parents e9bb975 + 3a8dae3 commit c84d0f0

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ The plugin is available in the [Gradle plugins repository](https://plugins.gradl
2424
Kotlin:
2525
```kotlin
2626
plugins {
27-
id("io.github.adityabhaskar.dependencygraph") version "0.1.0"
27+
id("io.github.adityabhaskar.dependencygraph") version "0.1.2"
2828
}
2929
```
3030

3131
Groovy:
3232
```groovy
3333
plugins {
34-
id "io.github.adityabhaskar.dependencygraph" version "0.1.0"
34+
id "io.github.adityabhaskar.dependencygraph" version "0.1.2"
3535
}
3636
```
3737

@@ -117,7 +117,7 @@ subgraph Legend
117117
end
118118
119119
%% Modules
120-
subgraph
120+
subgraph
121121
direction LR;
122122
:example:data{{:example:data}}:::javaNode;
123123
:example:domain{{:example:domain}}:::javaNode;
@@ -165,7 +165,7 @@ classDef andNode fill:#baffc9;
165165
classDef javaNode fill:#ffb3ba;
166166
167167
%% Modules
168-
subgraph
168+
subgraph
169169
direction LR;
170170
:example:data{{:example:data}}:::javaNode;
171171
:example:domain[:example:domain]:::javaNode;
@@ -194,7 +194,7 @@ click :example:models https://github.com/adityabhaskar/Gradle-dependency-graphs/
194194
195195
### Create a PR with changed graphs
196196

197-
The [`update-graphs-pr.yaml`](/.github/workflows//update-graphs-pr.yaml) action creates a new PR with changed dependency graphs when module dependencies change on `main`.
197+
The [`update-graphs-pr.yaml`](/.github/workflows//update-graphs-pr.yaml) action creates a new PR with changed dependency graphs when module dependencies change on `main`.
198198

199199
1. The action runs the plugin task `./gradlew :example:dependencyGraph` to generate fresh dependency graphs.
200200
2. A simple script - [`.github/ci-scripts/changed_files.sh`](/.github/ci-scripts/changed_files.sh) - collects all the changed graph files so they can be listed in the PR body.

plugin-build/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ID=io.github.adityabhaskar.dependencygraph
2-
VERSION=0.1.1
2+
VERSION=0.1.2
33
GROUP=io.github.adityabhaskar
44
DISPLAY_NAME=Gradle module dependency graphs
55
DESCRIPTION=A plugin to automatically produce Github/mermaid compatible dependency graphs

plugin-build/plugin/src/main/kotlin/io/github/adityabhaskar/dependencygraph/plugin/core/ParseGraph.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ internal fun parseDependencyGraph(
8585
val traits = dependencies
8686
.computeIfAbsent(graphKey) { mutableListOf() } as MutableList
8787

88-
if (config.name.lowercase(Locale.getDefault()).endsWith("implementation")) {
89-
traits.add("impl")
90-
} else {
88+
if (config.name.lowercase(Locale.getDefault()).endsWith("api")) {
9189
traits.add("api")
90+
} else {
91+
traits.add("impl")
9292
}
9393
}
9494
}

0 commit comments

Comments
 (0)