question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve development experience for plugin authors

See original GitHub issue

There are a number of things I noticed when I was playing with Kobalt plugins. I’m not a fan of big issues but I don’t feel that I have the technical insights to break it down into separate issues. Please feel free to split topics as you see fit.

I’ll be using kobalt jar for the full jar (e.g. kobalt-1.0.26.jar) and api jar (e.g. kobalt-plugin-api-1.0.26.jar) in the following description.

Documentation Please specify clearly how a plugin needs to depend on Kobalt (when to use the api jar and when to use the kobalt jar).

Things a plugin author should know:

  • where to find the kobalt jar and the api jar (i.e. which repository they are published to and the exact coordinates).
  • there are two versions out there (i.e. the api jar usually has a version that differs from the version of the kobalt jar)
  • KOBALT_VERSION as specified in the current documentation does not work (because that variable is not available by default).

The result of the discussion was that the following coordinates should be used:

  • compile("com.beust:kobalt:")
  • compile("com.beust:kobalt-plugin-api:")

This resulted in weird problems that wrong versions of kobalt would be pulled in. I’m not sure what the result of the discussion really was, there probably need to be followup issues for that.

It might be a nice idea to have helper functions (something like kobaltAPI() and kobaltJAR()) for that.

Running your plugin The documentation currently states:

The simplest way to run your plug-in in your IDE is to create a main function in the main class of your plug-in as follows:

fun main(argv: Array<String>) { com.beust.kobalt.main(argv) }

The documentation should mention that you need to add the following block to your build script:

val bs = buildScript {
  plugins(file(homeDir("projects/linecount/kobaltBuild/libs/linecount-0.3-SNAPSHOT.jar")))
}

It should also mention that the path here needs to be absolute to work.

Source.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cbeustcommented, Mar 26, 2017

@ethauvin Good suggestion. I just updated the documentation, although I decided not to use profile() just yet since it’s not properly supported in the IDEA plug-in yet.

Take a look:

http://beust.com/kobalt/plug-in-development/index.html#launch-configuration

0reactions
ethauvincommented, Mar 26, 2017

I would suggest changing the docs to:

val dev by profile()
val kobaltDependency = if (dev) "kobalt" else "kobalt-plugin-api"
...
    dependencies {
        compile("com.beust:$kobaltDependency:")
    }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Help for plugin authors - Elastic
Help for plugin authorsedit. The Elasticsearch repository contains examples of plugins. Some of these include: a plugin with custom settings; adding custom ...
Read more >
How to Prioritize the Developer Experience and Improve Output
Looking at where major DevOps trends are headed, a common theme across many tools and practices is improving the Developer Experience.
Read more >
How we are improving developer experience at QuintoAndar ...
Keeping our developers up to date with news is always a challenge and not addressing this issue has a strong impact on engineering...
Read more >
A Step-By-Step Guide to WordPress Plugin Development (And ...
In this guide to WordPress plugin development, we look at the skills that are required and the process that you need to follow...
Read more >
The Perils of Plugin-Driven Web Development
User experience is often an afterthought to plugin developers, especially for administrative UI. Unreliable Updates. Keeping pace with software ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found