Skip to content

Commit

Permalink
Make single function interfaces functional
Browse files Browse the repository at this point in the history
  • Loading branch information
iselo committed Aug 20, 2023
1 parent f063549 commit 6ebdc16
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions buildSrc/src/main/kotlin/co/raccoons/local/gradle/GradleBuild.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ class GradleBuild private constructor() {

companion object {


/**
* Returns build configuration handler of this project.
*/
fun of(project: Project) = object : ConfigurationHandler {
fun of(project: Project): ConfigurationHandler {

override fun use(plugin: Plugin<Project>): ConfigurationHandler {
plugin.apply(project)
return this
class Handler : ConfigurationHandler {
override fun use(plugin: Plugin<Project>): ConfigurationHandler {
plugin.apply(project)
return this
}
}
return Handler()
}
}

Expand Down

0 comments on commit 6ebdc16

Please sign in to comment.