File tree Expand file tree Collapse file tree 5 files changed +20
-6
lines changed
src/main/kotlin/com/jraska/module/graph/assertion Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,25 @@ Gradle plugin to keep your modules graph healthy and lean.
66## Assert your modules graph
77<img width =" 1281 " alt =" example_graph " src =" https://user-images.githubusercontent.com/6277721/70832705-18980e00-1df6-11ea-8b78-fc07ba570a2b.png " >
88
9- ## Configuration
9+ ## Usage
10+ ``` groovy
11+ buildscript {
12+ repositories {
13+ maven { url "https://plugins.gradle.org/m2/" }
14+ }
15+ dependencies {
16+ classpath 'gradle.plugin.modules-graph-assert:plugin:0.1.1'
17+ }
18+ }
19+
20+ apply plugin: 'com.jraska.module.graph.assertion'
21+ ```
22+
23+ #### Configuration
1024``` groovy
1125moduleGraphAssert {
1226 maxHeight = 4
1327 moduleLayersFromTheTop = [":feature", ":lib", ":core"]
14- restrinctInLayerDependencies = [":feature", ":lib"]
28+ restrictInLayerDependencies = [":feature", ":lib"]
1529}
1630```
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ gradlePlugin {
3434 plugins {
3535 modulesGraphAssert {
3636 id = ' com.jraska.module.graph.assertion'
37- version = ' 0.1.0 '
37+ version = ' 0.1.1 '
3838 displayName = ' Modules Graph Assert'
3939 description = ' Gradle plugin to keep your modules graph healthy and lean.'
4040 implementationClass = ' com.jraska.module.graph.assertion.ModuleGraphAssertionsPlugin'
Original file line number Diff line number Diff line change @@ -10,6 +10,6 @@ object Api {
1010 const val ASSERT_NO_IN_LAYER_PREFIX = " assertNoDependenciesWithin"
1111 }
1212
13- const val EXTENSION_ROOT = " modulesGraphAssert "
13+ const val EXTENSION_ROOT = " moduleGraphAssert "
1414}
1515
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ open class GraphRulesExtension {
44 var appModuleName = " :app"
55 var maxHeight: Int = 0
66 var moduleLayersFromTheTop = emptyArray<String >()
7- var restrinctInLayerDependencies = emptyArray<String >()
7+ var restrictInLayerDependencies = emptyArray<String >()
88}
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class ModuleGraphAssertionsPlugin : Plugin<Project> {
6565 }
6666
6767 private fun Project.addInLayerDependencyTasks (graphRules : GraphRulesExtension ): List <Task > {
68- return graphRules.restrinctInLayerDependencies .map { layerPrefix ->
68+ return graphRules.restrictInLayerDependencies .map { layerPrefix ->
6969 val taskNameSuffix = layerPrefix.replace(" :" , " " ).capitalizeFirst()
7070 val task = tasks.create(" ${Tasks .ASSERT_NO_IN_LAYER_PREFIX }$taskNameSuffix " , AssertNoInLayerDependencies ::class .java)
7171 task.layerPrefix = layerPrefix
You can’t perform that action at this time.
0 commit comments