-
-
Save mattrob33/75222e73651f561fe0ec6a38520e75ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Apply configuration settings that are shared across all modules. | |
*/ | |
fun PluginContainer.applyBaseConfig(project: Project) { | |
whenPluginAdded { | |
when (this) { | |
is AppPlugin -> { | |
project.extensions | |
.getByType<AppExtension>() | |
.apply { | |
baseConfig() | |
} | |
} | |
is LibraryPlugin -> { | |
project.extensions | |
.getByType<LibraryExtension>() | |
.apply { | |
baseConfig() | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment