gilcloud / sbt-gitlab

sbt plugin to allow dependency resolution and artifact publishing for gitlab
Apache License 2.0
26 stars 20 forks source link

is it possible to import a custom sbt plugin from GitLab? #40

Closed benckx closed 10 months ago

benckx commented 10 months ago

We created a custom sbt plugin which is on a repo on GitLab. We would like to import it from other projects.

It doesn't seem possible to add imports to the plugins.sbt file, which we could need to create the nl.zolotko.sbt.gitlab.GitlabCredentials.

import nl.zolotko.sbt.gitlab.GitlabCredentials
import nl.zolotko.sbt.gitlab.GitlabPlugin.autoImport.*

results in

import nl.zolotko.sbt.gitlab.GitlabCredentials
^
sbt.compiler.EvalException: Type error in expression
benckx commented 10 months ago

Ok found the issue.

You need to create project/project/plugins.sbt (the plugins config file for the meta-build). There you need to enable the plugins you need.

Then they can be used from the project/plugins.sbt