Coder Social home page Coder Social logo

scala-library's Introduction

Scala Library

com.kyledinh.scala-library.*

Use GitHub Packages as a maven repository to host your Scala packages.

  1. Generate A GitHub Token
  2. Add GitHub Token to SBT Build
  3. STB Command to compile and publish
  4. Example usage in a project

Software Versions

Software Version Install
JVM openjdk 17.0.4 https://sdkman.io/install
Scala 3.2.2 https://www.scala-lang.org/download
sbt 1.8.2 https://www.scala-sbt.org/download.html
sbt-github-packages 0.5.3 https://github.com/djspiewak/sbt-github-packages




Generate GitHub Token




Add GitHub Token to credentials used by SBT

  • Place generated token in $HOME/.sbt/1.0/github.sbt
credentials += 
  Credentials(
    "GitHub Package Registry",
    "maven.pkg.github.com",
    "GITHUB USERNAME",
    "GITHUB TOKEN")
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")




Commands to publish

  • sbtn publish




Example usage

build.sbt

externalResolvers += "ScalaLibrary packages" at "https://maven.pkg.github.com/kyledinh/scala-library"

lazy val root = project
  .in(file("."))
  .settings(
    name                                   := "scala-3-workspace",
    version                                := "0.1.0-SNAPSHOT",
    scalaVersion                           := "3.2.2",
    libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test,
    libraryDependencies += "com.kyledinh" %% "scala-library_3" % "0.1.0-SNAPSHOT"
  )

scala code

import com.kyledinh.sudoku.*

@main def hello: Unit =
  println("Solving a Sudoku problem...")

val s1 = Sudoku.loadFromResource("puzzles/sudoku_5.txt")
val answer = Sudoku.simulate(s1)




Resources

scala-library's People

Contributors

kyledinh avatar

Watchers

 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.