Giter Club home page Giter Club logo

sbt-importthis's Introduction

Import This

Tired of Googling for that annoying SBT import expression to pull in your favorite library? Here's a tiny CLI tool that pulls the SBT import expression for your favorite libraries off Scaladex right into your terminal, ready to be copy pasted into build.sbt.

Usage

import-this 1.0
Usage: import-this query

query  the package to search for

Example

> ./import-this sttp
found 20 options:
> softwaremill/sttp
  softwaremill/tapir
  ocadotechnology/sttp-oauth2
  softwaremill/sttp-model
  fullfacing/keycloak4s
  ragb/sttp-play-ws
  circe/circe
  stringbean/sttp-scribe
  typelevel/cats-effect
  allantl/jira4s
  lihaoyi/requests-scala
  endpoints4s/endpoints4s
  bartholomews/fsclient
  bot4s/telegram
  janstenpickle/trace4cats
  nryanov/consul4s
  softwaremill/sttp-shared
  softwaremill/sttp-client
  fullfacing/sttp-akka-monix
  softwaremill/tapir-sttp-client
fetching your import statement...
Link: http://index.scala-lang.org/softwaremill/sttp/core/3.1.1?target=_3.0.0-M3
libraryDependencies += "com.softwaremill.sttp.client3" %% "core" % "3.1.1"

Building

(TODO: Publish some binaries)

  1. sbt nativeImageRunAgent foo

    • A transitive dependency, jline, loads resources from the classpath at runtime to configure terminal output. This additional step allows the GraalVM native image agent to pick up the resource file paths (amongst other things) and create the configuration objects to be passed to the native image tool.
  2. sbt nativeImage

    • This actually builds the native image. sbt-native-image automatically pulls in GraalVM and installs the native image extension.

Under The Hood

FAQ

  • Shouldn't this be better off as an IDE extension/SBT Plugin?
    • Yes.
  • ...and?
    • This is really a toy project for me to 1) learn and use Cats (more specifically Cats-Effects), and 2) try out GraalVM's native image tool.
  • ...are you scraping the Scaladex HTML output?
    • oops. (and so yes, this is likely very fragile. Would be really nice if there's an open API!)
  • How about also searching Maven central/Bintray/Sonatype for Java libraries?
    • Good idea!

sbt-importthis's People

Contributors

hongee avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.