Skip to content

Commit

Permalink
update to latest structurizr version and make RelationshipView order …
Browse files Browse the repository at this point in the history
…accessible (#126)
  • Loading branch information
chriskn authored Sep 1, 2023
1 parent 623325c commit 548393f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ repositories {
mavenCentral()
}

val structurizrVersion = "1.24.0"
val structurizrExportVersion = "1.14.0"
val structurizrVersion = "1.26.1"
val structurizrExportVersion = "1.16.1"
val junitVersion = "5.10.0"
val assertJVersion = "3.24.2"
val detektVersion = "1.23.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.github.chriskn.structurizrextension.view
import com.structurizr.model.StaticStructureElement
import com.structurizr.view.DynamicView
import com.structurizr.view.RelationshipView
import com.structurizr.view.publicOrder

/**
* Adds a dependency to the [NestedParallelSequenceContext] from [source] to [destination] with the given properties
Expand All @@ -23,7 +24,7 @@ fun DynamicView.add(
technology: String? = null,
): RelationshipView {
val relationshipView = this.add(source, description, technology, destination)
relationshipView.order = (relationshipView.order.toInt() + this.numberOfEndedParallelFlows).toString()
relationshipView.publicOrder = (relationshipView.order.toInt() + this.numberOfEndedParallelFlows).toString()
return relationshipView
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.github.chriskn.structurizrextension.view
import com.structurizr.model.StaticStructureElement
import com.structurizr.view.DynamicView
import com.structurizr.view.RelationshipView
import com.structurizr.view.publicOrder

/**
* Wrapper around [DynamicView] to manage nested numbering for parallel sequences.
Expand Down Expand Up @@ -44,7 +45,7 @@ data class NestedParallelSequenceContext(
description = description,
technology = technology
)
view.order = getNextOder()
view.publicOrder = getNextOder()

return view
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.structurizr.view

var RelationshipView.publicOrder: String
get() = this.order
set(order) { this.order = order }

0 comments on commit 548393f

Please sign in to comment.