-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
In #20 issue it became possible to configure access to the context from the entity interface. The default access strategy is "inheritance" - when each entity implements the context interface. But, as the practice of using the plugin in real projects has shown, such an access strategy is extremely inconvenient. Context inheritance often leads to confusion in the customized API.
It would be great to change the default context access strategy from inheritance to a function in Kobby 2.0 release.
Attention! It is breaking change!!! To return to previous settings, use:
Gradle
plugins {
id("io.github.ermadmi78.kobby")
}
kobby {
kotlin {
entity {
contextInheritanceEnabled = true
contextFunEnabled = false
}
}
}
Maven
<build>
<plugins>
<plugin>
<groupId>io.github.ermadmi78</groupId>
<artifactId>kobby-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate-kotlin</goal>
</goals>
<configuration>
<kotlin>
<entity>
<contextInheritanceEnabled>true</contextInheritanceEnabled>
<contextFunEnabled>false</contextFunEnabled>
</entity>
</kotlin>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request