Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow usingInitScript(Consumer) for inline configuration of init script #33

Open
lacasseio opened this issue Feb 9, 2021 · 1 comment
Labels
enhancement New feature or request in:runner-kit

Comments

@lacasseio
Copy link
Member

Instead of:

def initScriptFile = file('init.gradle')
initScriptFile << configurePluginClasspathAsInitScriptDependencies() << '''
    apply plugin: dev.nokee.init.NokeeInitPlugin
'''
executer = executer.usingInitScript(initScriptFile).

we could have something like:

executer = executer.usingInitScript(nokeeInitScript())

private static Consumer<InitScriptBuilder> nokeeInitScript() {
  return builder -> builder.inDirectoryAt('init.gradle').configurePluginClasspathAsInitScriptDependencies().applyPlugin('dev.nokee.init.NokeeInitPlugin')
}

The InitScript builder would allow setting the init script in the init.d directory if needed but would also fail if using a shared directory.

@lacasseio lacasseio added enhancement New feature or request in:runner-kit labels Feb 9, 2021
@lacasseio lacasseio added this to the 1.4 milestone Mar 9, 2021
@lacasseio lacasseio modified the milestones: 1.4, 1.5 Apr 10, 2021
@lacasseio
Copy link
Member Author

An experimentation of this work is under Nokee, there are still quite a bit of open questions so we will unscheduled it for now.

@lacasseio lacasseio removed this from the 1.6 milestone Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in:runner-kit
Projects
None yet
Development

No branches or pull requests

1 participant