diff --git a/.github/run.sh b/.github/run.sh index 4079db4..2466e4c 100755 --- a/.github/run.sh +++ b/.github/run.sh @@ -8,7 +8,7 @@ no_lint=0 while (( $# > 0 )); do case "$1" in --help) - printf "run.sh [OPTION]... [PKG]\n" + printf "run.sh [OPTION]... [DIR]\n" printf "options:\n" printf "\t--help Show help\n" printf "\t--no-test Skip tests\n" @@ -29,21 +29,24 @@ while (( $# > 0 )); do esac done +./mill __.compile + if (( no_test == 0 )); then if [[ -z "$1" ]]; then - sbt -warn test + ./mill __.test + elif ./mill resolve problems["$1"].__.test &>/dev/null; then + ./mill problems["$1"].__.test else - green='\033[1;32m' + red='\033[0;31m' no_color='\033[0m' - printf "Running tests in packages matching: %b%s*%b\n" "$green" "$1" "$no_color" - sbt -warn "Test / testOnly $1*" + printf "%bNo tests found in: %s%b\n" "$red" "$1" "$no_color" fi fi if (( no_lint == 0 )); then if [[ -z "${CI}" ]]; then - sbt -warn scalafmtAll + ./mill mill.scalalib.scalafmt.ScalafmtModule/reformatAll problems[_].sources else - sbt -warn scalafmtCheckAll + ./mill mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll problems[_].sources fi fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49264ae..6a2717d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,12 +8,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin - java-version: 17 + java-version: 21 - name: Test run: ./.github/run.sh --no-lint - name: Lint diff --git a/.gitignore b/.gitignore index 7c2f816..4cf6a63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1,31 @@ -# macOS .DS_Store +*.class +*.log +*~ -# sbt +# idea +.idea +.idea_modules +/.worksheet/ + +# mill +out/ + +.bsp/ +.metals/ +.vscode/ +.bloop/ + +# SBT dist/* target/ lib_managed/ src_managed/ project/boot/ -project/project project/plugins/project/ -project/local-plugins.sbt .history -.ensime -.ensime_cache/ -.sbt-scripted/ -local.sbt +.cache +.lib/ -# Bloop -.bsp - -# VS Code -.vscode/ - -# Metals -.bloop/ -.metals/ -metals.sbt - -# IDEA -.idea -.idea_modules -/.worksheet/ +# virtual machine crash logs +hs_err_pid* diff --git a/.mill-version b/.mill-version new file mode 100644 index 0000000..7fd0b1e --- /dev/null +++ b/.mill-version @@ -0,0 +1 @@ +0.12.4 \ No newline at end of file diff --git a/.scalafmt.conf b/.scalafmt.conf index cf5cb5b..449f165 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.7.17" +version = "3.8.3" align.preset = more maxColumn = 120 runner.dialect = scala3 diff --git a/build.mill b/build.mill new file mode 100644 index 0000000..a8cf16d --- /dev/null +++ b/build.mill @@ -0,0 +1,35 @@ +package build + +import mill._, scalalib._, scalafmt._ +import $packages._ +import $file.{versions => v} + +val moduleNames = interp.watchValue(os.list(millSourcePath / "problems").map(_.last)) + +object problems extends Cross[NineNineModule](moduleNames) + +trait NineNineModule extends ScalaModule with Cross.Module[String] with ScalafmtModule { + + val scalaVersion = v.scalaVersion + def millSourcePath = super.millSourcePath / crossValue + + def scalacOptions: T[Seq[String]] = Seq( + "-encoding", "UTF-8", + "-feature", + "-Werror", + "-explain", + "-deprecation", + "-unchecked", + "-Wunused:all", + "-rewrite", + "-indent", + "-source", "future", + ) + + object test extends ScalaTests with TestModule.Munit { + def ivyDeps = Agg( + ivy"org.scalameta::munit:${v.munitVersion}", + ivy"org.scalameta::munit-scalacheck:${v.munitScalaCheckVersion}", + ) + } +} diff --git a/build.sbt b/build.sbt deleted file mode 100644 index ba3ee19..0000000 --- a/build.sbt +++ /dev/null @@ -1,31 +0,0 @@ -val scala3Version = "3.3.1" - -lazy val root = project - .in(file(".")) - .settings( - name := "99-scala", - version := "1.0.0", - - scalaVersion := scala3Version, - - scalafmtPrintDiff := true, - - libraryDependencies ++= Seq( - "org.scalameta" %% "munit" % "1.0.0-M10" % Test, - "org.scalameta" %% "munit-scalacheck" % "1.0.0-M10" % Test, - // "org.typelevel" %% "cats-core" % "2.10.0" - ), - - scalacOptions ++= Seq( - "-encoding", "UTF-8", - "-feature", - "-Werror", - "-explain", - "-deprecation", - "-unchecked", - "-Wunused:all", - "-rewrite", - "-indent", - "-source", "future", - ), - ) diff --git a/mill b/mill new file mode 100755 index 0000000..44386d6 --- /dev/null +++ b/mill @@ -0,0 +1,241 @@ +#!/usr/bin/env sh + +# This is a wrapper script, that automatically download mill from GitHub release pages +# You can give the required mill version with --mill-version parameter +# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION +# +# Original Project page: https://github.com/lefou/millw +# Script Version: 0.4.12 +# +# If you want to improve this script, please also contribute your changes back! +# +# Licensed under the Apache License, Version 2.0 + +set -e + +if [ -z "${DEFAULT_MILL_VERSION}" ] ; then + DEFAULT_MILL_VERSION=0.12.4 +fi + + +if [ -z "${GITHUB_RELEASE_CDN}" ] ; then + GITHUB_RELEASE_CDN="" +fi + + +MILL_REPO_URL="https://github.com/com-lihaoyi/mill" + +if [ -z "${CURL_CMD}" ] ; then + CURL_CMD=curl +fi + +# Explicit commandline argument takes precedence over all other methods +if [ "$1" = "--mill-version" ] ; then + shift + if [ "x$1" != "x" ] ; then + MILL_VERSION="$1" + shift + else + echo "You specified --mill-version without a version." 1>&2 + echo "Please provide a version that matches one provided on" 1>&2 + echo "${MILL_REPO_URL}/releases" 1>&2 + false + fi +fi + +# Please note, that if a MILL_VERSION is already set in the environment, +# We reuse it's value and skip searching for a value. + +# If not already set, read .mill-version file +if [ -z "${MILL_VERSION}" ] ; then + if [ -f ".mill-version" ] ; then + MILL_VERSION="$(tr '\r' '\n' < .mill-version | head -n 1 2> /dev/null)" + elif [ -f ".config/mill-version" ] ; then + MILL_VERSION="$(tr '\r' '\n' < .config/mill-version | head -n 1 2> /dev/null)" + fi +fi + +MILL_USER_CACHE_DIR="${XDG_CACHE_HOME:-${HOME}/.cache}/mill" + +if [ -z "${MILL_DOWNLOAD_PATH}" ] ; then + MILL_DOWNLOAD_PATH="${MILL_USER_CACHE_DIR}/download" +fi + +# If not already set, try to fetch newest from Github +if [ -z "${MILL_VERSION}" ] ; then + # TODO: try to load latest version from release page + echo "No mill version specified." 1>&2 + echo "You should provide a version via '.mill-version' file or --mill-version option." 1>&2 + + mkdir -p "${MILL_DOWNLOAD_PATH}" + LANG=C touch -d '1 hour ago' "${MILL_DOWNLOAD_PATH}/.expire_latest" 2>/dev/null || ( + # we might be on OSX or BSD which don't have -d option for touch + # but probably a -A [-][[hh]mm]SS + touch "${MILL_DOWNLOAD_PATH}/.expire_latest"; touch -A -010000 "${MILL_DOWNLOAD_PATH}/.expire_latest" + ) || ( + # in case we still failed, we retry the first touch command with the intention + # to show the (previously suppressed) error message + LANG=C touch -d '1 hour ago' "${MILL_DOWNLOAD_PATH}/.expire_latest" + ) + + # POSIX shell variant of bash's -nt operator, see https://unix.stackexchange.com/a/449744/6993 + # if [ "${MILL_DOWNLOAD_PATH}/.latest" -nt "${MILL_DOWNLOAD_PATH}/.expire_latest" ] ; then + if [ -n "$(find -L "${MILL_DOWNLOAD_PATH}/.latest" -prune -newer "${MILL_DOWNLOAD_PATH}/.expire_latest")" ]; then + # we know a current latest version + MILL_VERSION=$(head -n 1 "${MILL_DOWNLOAD_PATH}"/.latest 2> /dev/null) + fi + + if [ -z "${MILL_VERSION}" ] ; then + # we don't know a current latest version + echo "Retrieving latest mill version ..." 1>&2 + LANG=C ${CURL_CMD} -s -i -f -I ${MILL_REPO_URL}/releases/latest 2> /dev/null | grep --ignore-case Location: | sed s'/^.*tag\///' | tr -d '\r\n' > "${MILL_DOWNLOAD_PATH}/.latest" + MILL_VERSION=$(head -n 1 "${MILL_DOWNLOAD_PATH}"/.latest 2> /dev/null) + fi + + if [ -z "${MILL_VERSION}" ] ; then + # Last resort + MILL_VERSION="${DEFAULT_MILL_VERSION}" + echo "Falling back to hardcoded mill version ${MILL_VERSION}" 1>&2 + else + echo "Using mill version ${MILL_VERSION}" 1>&2 + fi +fi + +MILL="${MILL_DOWNLOAD_PATH}/${MILL_VERSION}" + +try_to_use_system_mill() { + if [ "$(uname)" != "Linux" ]; then + return 0 + fi + + MILL_IN_PATH="$(command -v mill || true)" + + if [ -z "${MILL_IN_PATH}" ]; then + return 0 + fi + + SYSTEM_MILL_FIRST_TWO_BYTES=$(head --bytes=2 "${MILL_IN_PATH}") + if [ "${SYSTEM_MILL_FIRST_TWO_BYTES}" = "#!" ]; then + # MILL_IN_PATH is (very likely) a shell script and not the mill + # executable, ignore it. + return 0 + fi + + SYSTEM_MILL_PATH=$(readlink -e "${MILL_IN_PATH}") + SYSTEM_MILL_SIZE=$(stat --format=%s "${SYSTEM_MILL_PATH}") + SYSTEM_MILL_MTIME=$(stat --format=%y "${SYSTEM_MILL_PATH}") + + if [ ! -d "${MILL_USER_CACHE_DIR}" ]; then + mkdir -p "${MILL_USER_CACHE_DIR}" + fi + + SYSTEM_MILL_INFO_FILE="${MILL_USER_CACHE_DIR}/system-mill-info" + if [ -f "${SYSTEM_MILL_INFO_FILE}" ]; then + parseSystemMillInfo() { + LINE_NUMBER="${1}" + # Select the line number of the SYSTEM_MILL_INFO_FILE, cut the + # variable definition in that line in two halves and return + # the value, and finally remove the quotes. + sed -n "${LINE_NUMBER}p" "${SYSTEM_MILL_INFO_FILE}" |\ + cut -d= -f2 |\ + sed 's/"\(.*\)"/\1/' + } + + CACHED_SYSTEM_MILL_PATH=$(parseSystemMillInfo 1) + CACHED_SYSTEM_MILL_VERSION=$(parseSystemMillInfo 2) + CACHED_SYSTEM_MILL_SIZE=$(parseSystemMillInfo 3) + CACHED_SYSTEM_MILL_MTIME=$(parseSystemMillInfo 4) + + if [ "${SYSTEM_MILL_PATH}" = "${CACHED_SYSTEM_MILL_PATH}" ] \ + && [ "${SYSTEM_MILL_SIZE}" = "${CACHED_SYSTEM_MILL_SIZE}" ] \ + && [ "${SYSTEM_MILL_MTIME}" = "${CACHED_SYSTEM_MILL_MTIME}" ]; then + if [ "${CACHED_SYSTEM_MILL_VERSION}" = "${MILL_VERSION}" ]; then + MILL="${SYSTEM_MILL_PATH}" + return 0 + else + return 0 + fi + fi + fi + + SYSTEM_MILL_VERSION=$(${SYSTEM_MILL_PATH} --version | head -n1 | sed -n 's/^Mill.*version \(.*\)/\1/p') + + cat < "${SYSTEM_MILL_INFO_FILE}" +CACHED_SYSTEM_MILL_PATH="${SYSTEM_MILL_PATH}" +CACHED_SYSTEM_MILL_VERSION="${SYSTEM_MILL_VERSION}" +CACHED_SYSTEM_MILL_SIZE="${SYSTEM_MILL_SIZE}" +CACHED_SYSTEM_MILL_MTIME="${SYSTEM_MILL_MTIME}" +EOF + + if [ "${SYSTEM_MILL_VERSION}" = "${MILL_VERSION}" ]; then + MILL="${SYSTEM_MILL_PATH}" + fi +} +try_to_use_system_mill + +# If not already downloaded, download it +if [ ! -s "${MILL}" ] ; then + + # support old non-XDG download dir + MILL_OLD_DOWNLOAD_PATH="${HOME}/.mill/download" + OLD_MILL="${MILL_OLD_DOWNLOAD_PATH}/${MILL_VERSION}" + if [ -x "${OLD_MILL}" ] ; then + MILL="${OLD_MILL}" + else + case $MILL_VERSION in + 0.0.* | 0.1.* | 0.2.* | 0.3.* | 0.4.* ) + DOWNLOAD_SUFFIX="" + DOWNLOAD_FROM_MAVEN=0 + ;; + 0.5.* | 0.6.* | 0.7.* | 0.8.* | 0.9.* | 0.10.* | 0.11.0-M* ) + DOWNLOAD_SUFFIX="-assembly" + DOWNLOAD_FROM_MAVEN=0 + ;; + *) + DOWNLOAD_SUFFIX="-assembly" + DOWNLOAD_FROM_MAVEN=1 + ;; + esac + + DOWNLOAD_FILE=$(mktemp mill.XXXXXX) + + if [ "$DOWNLOAD_FROM_MAVEN" = "1" ] ; then + DOWNLOAD_URL="https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/${MILL_VERSION}/mill-dist-${MILL_VERSION}.jar" + else + MILL_VERSION_TAG=$(echo "$MILL_VERSION" | sed -E 's/([^-]+)(-M[0-9]+)?(-.*)?/\1\2/') + DOWNLOAD_URL="${GITHUB_RELEASE_CDN}${MILL_REPO_URL}/releases/download/${MILL_VERSION_TAG}/${MILL_VERSION}${DOWNLOAD_SUFFIX}" + unset MILL_VERSION_TAG + fi + + # TODO: handle command not found + echo "Downloading mill ${MILL_VERSION} from ${DOWNLOAD_URL} ..." 1>&2 + ${CURL_CMD} -f -L -o "${DOWNLOAD_FILE}" "${DOWNLOAD_URL}" + chmod +x "${DOWNLOAD_FILE}" + mkdir -p "${MILL_DOWNLOAD_PATH}" + mv "${DOWNLOAD_FILE}" "${MILL}" + + unset DOWNLOAD_FILE + unset DOWNLOAD_SUFFIX + fi +fi + +if [ -z "$MILL_MAIN_CLI" ] ; then + MILL_MAIN_CLI="${0}" +fi + +MILL_FIRST_ARG="" +if [ "$1" = "--bsp" ] || [ "$1" = "-i" ] || [ "$1" = "--interactive" ] || [ "$1" = "--no-server" ] || [ "$1" = "--repl" ] || [ "$1" = "--help" ] ; then + # Need to preserve the first position of those listed options + MILL_FIRST_ARG=$1 + shift +fi + +unset MILL_DOWNLOAD_PATH +unset MILL_OLD_DOWNLOAD_PATH +unset OLD_MILL +unset MILL_VERSION +unset MILL_REPO_URL + +# We don't quote MILL_FIRST_ARG on purpose, so we can expand the empty value without quotes +# shellcheck disable=SC2086 +exec "${MILL}" $MILL_FIRST_ARG -D "mill.main.cli=${MILL_MAIN_CLI}" "$@" \ No newline at end of file diff --git a/src/main/scala/arithmetic/P31.scala b/problems/arithmetic/src/P31.scala similarity index 100% rename from src/main/scala/arithmetic/P31.scala rename to problems/arithmetic/src/P31.scala diff --git a/src/main/scala/arithmetic/P32.scala b/problems/arithmetic/src/P32.scala similarity index 100% rename from src/main/scala/arithmetic/P32.scala rename to problems/arithmetic/src/P32.scala diff --git a/src/main/scala/arithmetic/P33.scala b/problems/arithmetic/src/P33.scala similarity index 100% rename from src/main/scala/arithmetic/P33.scala rename to problems/arithmetic/src/P33.scala diff --git a/src/main/scala/arithmetic/P34.scala b/problems/arithmetic/src/P34.scala similarity index 100% rename from src/main/scala/arithmetic/P34.scala rename to problems/arithmetic/src/P34.scala diff --git a/src/main/scala/arithmetic/P35.scala b/problems/arithmetic/src/P35.scala similarity index 100% rename from src/main/scala/arithmetic/P35.scala rename to problems/arithmetic/src/P35.scala diff --git a/src/main/scala/arithmetic/P36.scala b/problems/arithmetic/src/P36.scala similarity index 100% rename from src/main/scala/arithmetic/P36.scala rename to problems/arithmetic/src/P36.scala diff --git a/src/main/scala/arithmetic/P39.scala b/problems/arithmetic/src/P39.scala similarity index 100% rename from src/main/scala/arithmetic/P39.scala rename to problems/arithmetic/src/P39.scala diff --git a/src/main/scala/arithmetic/P40.scala b/problems/arithmetic/src/P40.scala similarity index 100% rename from src/main/scala/arithmetic/P40.scala rename to problems/arithmetic/src/P40.scala diff --git a/src/main/scala/arithmetic/P41.scala b/problems/arithmetic/src/P41.scala similarity index 100% rename from src/main/scala/arithmetic/P41.scala rename to problems/arithmetic/src/P41.scala diff --git a/src/test/scala/arithmetic/P31Suite.scala b/problems/arithmetic/test/src/P31Suite.scala similarity index 100% rename from src/test/scala/arithmetic/P31Suite.scala rename to problems/arithmetic/test/src/P31Suite.scala diff --git a/src/test/scala/arithmetic/P32Suite.scala b/problems/arithmetic/test/src/P32Suite.scala similarity index 100% rename from src/test/scala/arithmetic/P32Suite.scala rename to problems/arithmetic/test/src/P32Suite.scala diff --git a/src/test/scala/arithmetic/P33Suite.scala b/problems/arithmetic/test/src/P33Suite.scala similarity index 100% rename from src/test/scala/arithmetic/P33Suite.scala rename to problems/arithmetic/test/src/P33Suite.scala diff --git a/src/test/scala/arithmetic/P34Suite.scala b/problems/arithmetic/test/src/P34Suite.scala similarity index 100% rename from src/test/scala/arithmetic/P34Suite.scala rename to problems/arithmetic/test/src/P34Suite.scala diff --git a/src/test/scala/arithmetic/P35Suite.scala b/problems/arithmetic/test/src/P35Suite.scala similarity index 100% rename from src/test/scala/arithmetic/P35Suite.scala rename to problems/arithmetic/test/src/P35Suite.scala diff --git a/src/test/scala/arithmetic/P36Suite.scala b/problems/arithmetic/test/src/P36Suite.scala similarity index 100% rename from src/test/scala/arithmetic/P36Suite.scala rename to problems/arithmetic/test/src/P36Suite.scala diff --git a/src/test/scala/arithmetic/P39Suite.scala b/problems/arithmetic/test/src/P39Suite.scala similarity index 100% rename from src/test/scala/arithmetic/P39Suite.scala rename to problems/arithmetic/test/src/P39Suite.scala diff --git a/src/test/scala/arithmetic/P40Suite.scala b/problems/arithmetic/test/src/P40Suite.scala similarity index 100% rename from src/test/scala/arithmetic/P40Suite.scala rename to problems/arithmetic/test/src/P40Suite.scala diff --git a/src/test/scala/arithmetic/P41Suite.scala b/problems/arithmetic/test/src/P41Suite.scala similarity index 100% rename from src/test/scala/arithmetic/P41Suite.scala rename to problems/arithmetic/test/src/P41Suite.scala diff --git a/src/main/scala/bintree/P55.scala b/problems/bintree/src/P55.scala similarity index 100% rename from src/main/scala/bintree/P55.scala rename to problems/bintree/src/P55.scala diff --git a/src/main/scala/bintree/P56.scala b/problems/bintree/src/P56.scala similarity index 100% rename from src/main/scala/bintree/P56.scala rename to problems/bintree/src/P56.scala diff --git a/src/main/scala/bintree/P57.scala b/problems/bintree/src/P57.scala similarity index 100% rename from src/main/scala/bintree/P57.scala rename to problems/bintree/src/P57.scala diff --git a/src/main/scala/bintree/P58.scala b/problems/bintree/src/P58.scala similarity index 100% rename from src/main/scala/bintree/P58.scala rename to problems/bintree/src/P58.scala diff --git a/src/main/scala/bintree/P59.scala b/problems/bintree/src/P59.scala similarity index 100% rename from src/main/scala/bintree/P59.scala rename to problems/bintree/src/P59.scala diff --git a/src/main/scala/bintree/Tree.scala b/problems/bintree/src/Tree.scala similarity index 100% rename from src/main/scala/bintree/Tree.scala rename to problems/bintree/src/Tree.scala diff --git a/src/test/scala/bintree/P55Suite.scala b/problems/bintree/test/src/P55Suite.scala similarity index 100% rename from src/test/scala/bintree/P55Suite.scala rename to problems/bintree/test/src/P55Suite.scala diff --git a/src/test/scala/bintree/P56Suite.scala b/problems/bintree/test/src/P56Suite.scala similarity index 100% rename from src/test/scala/bintree/P56Suite.scala rename to problems/bintree/test/src/P56Suite.scala diff --git a/src/test/scala/bintree/P57Suite.scala b/problems/bintree/test/src/P57Suite.scala similarity index 97% rename from src/test/scala/bintree/P57Suite.scala rename to problems/bintree/test/src/P57Suite.scala index b717403..cc5deef 100644 --- a/src/test/scala/bintree/P57Suite.scala +++ b/problems/bintree/test/src/P57Suite.scala @@ -1,7 +1,6 @@ package bintree import munit.FunSuite -import Tree.* import P56.* import P57.* diff --git a/src/test/scala/bintree/P58Suite.scala b/problems/bintree/test/src/P58Suite.scala similarity index 100% rename from src/test/scala/bintree/P58Suite.scala rename to problems/bintree/test/src/P58Suite.scala diff --git a/src/test/scala/bintree/P59Suite.scala b/problems/bintree/test/src/P59Suite.scala similarity index 100% rename from src/test/scala/bintree/P59Suite.scala rename to problems/bintree/test/src/P59Suite.scala diff --git a/src/main/scala/list/P01.scala b/problems/list/src/P01.scala similarity index 100% rename from src/main/scala/list/P01.scala rename to problems/list/src/P01.scala diff --git a/src/main/scala/list/P02.scala b/problems/list/src/P02.scala similarity index 100% rename from src/main/scala/list/P02.scala rename to problems/list/src/P02.scala diff --git a/src/main/scala/list/P03.scala b/problems/list/src/P03.scala similarity index 100% rename from src/main/scala/list/P03.scala rename to problems/list/src/P03.scala diff --git a/src/main/scala/list/P04.scala b/problems/list/src/P04.scala similarity index 100% rename from src/main/scala/list/P04.scala rename to problems/list/src/P04.scala diff --git a/src/main/scala/list/P05.scala b/problems/list/src/P05.scala similarity index 100% rename from src/main/scala/list/P05.scala rename to problems/list/src/P05.scala diff --git a/src/main/scala/list/P06.scala b/problems/list/src/P06.scala similarity index 100% rename from src/main/scala/list/P06.scala rename to problems/list/src/P06.scala diff --git a/src/main/scala/list/P07.scala b/problems/list/src/P07.scala similarity index 100% rename from src/main/scala/list/P07.scala rename to problems/list/src/P07.scala diff --git a/src/main/scala/list/P08.scala b/problems/list/src/P08.scala similarity index 100% rename from src/main/scala/list/P08.scala rename to problems/list/src/P08.scala diff --git a/src/main/scala/list/P09.scala b/problems/list/src/P09.scala similarity index 100% rename from src/main/scala/list/P09.scala rename to problems/list/src/P09.scala diff --git a/src/main/scala/list/P10.scala b/problems/list/src/P10.scala similarity index 100% rename from src/main/scala/list/P10.scala rename to problems/list/src/P10.scala diff --git a/src/main/scala/list/P11.scala b/problems/list/src/P11.scala similarity index 100% rename from src/main/scala/list/P11.scala rename to problems/list/src/P11.scala diff --git a/src/main/scala/list/P12.scala b/problems/list/src/P12.scala similarity index 100% rename from src/main/scala/list/P12.scala rename to problems/list/src/P12.scala diff --git a/src/main/scala/list/P13.scala b/problems/list/src/P13.scala similarity index 100% rename from src/main/scala/list/P13.scala rename to problems/list/src/P13.scala diff --git a/src/main/scala/list/P14.scala b/problems/list/src/P14.scala similarity index 100% rename from src/main/scala/list/P14.scala rename to problems/list/src/P14.scala diff --git a/src/main/scala/list/P15.scala b/problems/list/src/P15.scala similarity index 100% rename from src/main/scala/list/P15.scala rename to problems/list/src/P15.scala diff --git a/src/main/scala/list/P16.scala b/problems/list/src/P16.scala similarity index 100% rename from src/main/scala/list/P16.scala rename to problems/list/src/P16.scala diff --git a/src/main/scala/list/P17.scala b/problems/list/src/P17.scala similarity index 100% rename from src/main/scala/list/P17.scala rename to problems/list/src/P17.scala diff --git a/src/main/scala/list/P18.scala b/problems/list/src/P18.scala similarity index 100% rename from src/main/scala/list/P18.scala rename to problems/list/src/P18.scala diff --git a/src/main/scala/list/P19.scala b/problems/list/src/P19.scala similarity index 100% rename from src/main/scala/list/P19.scala rename to problems/list/src/P19.scala diff --git a/src/main/scala/list/P20.scala b/problems/list/src/P20.scala similarity index 100% rename from src/main/scala/list/P20.scala rename to problems/list/src/P20.scala diff --git a/src/main/scala/list/P21.scala b/problems/list/src/P21.scala similarity index 100% rename from src/main/scala/list/P21.scala rename to problems/list/src/P21.scala diff --git a/src/main/scala/list/P22.scala b/problems/list/src/P22.scala similarity index 100% rename from src/main/scala/list/P22.scala rename to problems/list/src/P22.scala diff --git a/src/main/scala/list/P23.scala b/problems/list/src/P23.scala similarity index 100% rename from src/main/scala/list/P23.scala rename to problems/list/src/P23.scala diff --git a/src/main/scala/list/P24.scala b/problems/list/src/P24.scala similarity index 100% rename from src/main/scala/list/P24.scala rename to problems/list/src/P24.scala diff --git a/src/main/scala/list/P25.scala b/problems/list/src/P25.scala similarity index 100% rename from src/main/scala/list/P25.scala rename to problems/list/src/P25.scala diff --git a/src/main/scala/list/P26.scala b/problems/list/src/P26.scala similarity index 100% rename from src/main/scala/list/P26.scala rename to problems/list/src/P26.scala diff --git a/src/main/scala/list/P27.scala b/problems/list/src/P27.scala similarity index 100% rename from src/main/scala/list/P27.scala rename to problems/list/src/P27.scala diff --git a/src/main/scala/list/P28.scala b/problems/list/src/P28.scala similarity index 100% rename from src/main/scala/list/P28.scala rename to problems/list/src/P28.scala diff --git a/src/test/scala/list/ListGen.scala b/problems/list/test/src/ListGen.scala similarity index 100% rename from src/test/scala/list/ListGen.scala rename to problems/list/test/src/ListGen.scala diff --git a/src/test/scala/list/P01Suite.scala b/problems/list/test/src/P01Suite.scala similarity index 100% rename from src/test/scala/list/P01Suite.scala rename to problems/list/test/src/P01Suite.scala diff --git a/src/test/scala/list/P02Suite.scala b/problems/list/test/src/P02Suite.scala similarity index 100% rename from src/test/scala/list/P02Suite.scala rename to problems/list/test/src/P02Suite.scala diff --git a/src/test/scala/list/P03Suite.scala b/problems/list/test/src/P03Suite.scala similarity index 100% rename from src/test/scala/list/P03Suite.scala rename to problems/list/test/src/P03Suite.scala diff --git a/src/test/scala/list/P04Suite.scala b/problems/list/test/src/P04Suite.scala similarity index 100% rename from src/test/scala/list/P04Suite.scala rename to problems/list/test/src/P04Suite.scala diff --git a/src/test/scala/list/P05Suite.scala b/problems/list/test/src/P05Suite.scala similarity index 100% rename from src/test/scala/list/P05Suite.scala rename to problems/list/test/src/P05Suite.scala diff --git a/src/test/scala/list/P06Suite.scala b/problems/list/test/src/P06Suite.scala similarity index 100% rename from src/test/scala/list/P06Suite.scala rename to problems/list/test/src/P06Suite.scala diff --git a/src/test/scala/list/P07Suite.scala b/problems/list/test/src/P07Suite.scala similarity index 100% rename from src/test/scala/list/P07Suite.scala rename to problems/list/test/src/P07Suite.scala diff --git a/src/test/scala/list/P08Suite.scala b/problems/list/test/src/P08Suite.scala similarity index 100% rename from src/test/scala/list/P08Suite.scala rename to problems/list/test/src/P08Suite.scala diff --git a/src/test/scala/list/P09Suite.scala b/problems/list/test/src/P09Suite.scala similarity index 100% rename from src/test/scala/list/P09Suite.scala rename to problems/list/test/src/P09Suite.scala diff --git a/src/test/scala/list/P10Suite.scala b/problems/list/test/src/P10Suite.scala similarity index 100% rename from src/test/scala/list/P10Suite.scala rename to problems/list/test/src/P10Suite.scala diff --git a/src/test/scala/list/P11Suite.scala b/problems/list/test/src/P11Suite.scala similarity index 100% rename from src/test/scala/list/P11Suite.scala rename to problems/list/test/src/P11Suite.scala diff --git a/src/test/scala/list/P12Suite.scala b/problems/list/test/src/P12Suite.scala similarity index 100% rename from src/test/scala/list/P12Suite.scala rename to problems/list/test/src/P12Suite.scala diff --git a/src/test/scala/list/P13Suite.scala b/problems/list/test/src/P13Suite.scala similarity index 100% rename from src/test/scala/list/P13Suite.scala rename to problems/list/test/src/P13Suite.scala diff --git a/src/test/scala/list/P14Suite.scala b/problems/list/test/src/P14Suite.scala similarity index 100% rename from src/test/scala/list/P14Suite.scala rename to problems/list/test/src/P14Suite.scala diff --git a/src/test/scala/list/P15Suite.scala b/problems/list/test/src/P15Suite.scala similarity index 100% rename from src/test/scala/list/P15Suite.scala rename to problems/list/test/src/P15Suite.scala diff --git a/src/test/scala/list/P16Suite.scala b/problems/list/test/src/P16Suite.scala similarity index 100% rename from src/test/scala/list/P16Suite.scala rename to problems/list/test/src/P16Suite.scala diff --git a/src/test/scala/list/P17Suite.scala b/problems/list/test/src/P17Suite.scala similarity index 100% rename from src/test/scala/list/P17Suite.scala rename to problems/list/test/src/P17Suite.scala diff --git a/src/test/scala/list/P18Suite.scala b/problems/list/test/src/P18Suite.scala similarity index 100% rename from src/test/scala/list/P18Suite.scala rename to problems/list/test/src/P18Suite.scala diff --git a/src/test/scala/list/P19Suite.scala b/problems/list/test/src/P19Suite.scala similarity index 100% rename from src/test/scala/list/P19Suite.scala rename to problems/list/test/src/P19Suite.scala diff --git a/src/test/scala/list/P20Suite.scala b/problems/list/test/src/P20Suite.scala similarity index 100% rename from src/test/scala/list/P20Suite.scala rename to problems/list/test/src/P20Suite.scala diff --git a/src/test/scala/list/P21Suite.scala b/problems/list/test/src/P21Suite.scala similarity index 100% rename from src/test/scala/list/P21Suite.scala rename to problems/list/test/src/P21Suite.scala diff --git a/src/test/scala/list/P22Suite.scala b/problems/list/test/src/P22Suite.scala similarity index 100% rename from src/test/scala/list/P22Suite.scala rename to problems/list/test/src/P22Suite.scala diff --git a/src/test/scala/list/P23Suite.scala b/problems/list/test/src/P23Suite.scala similarity index 100% rename from src/test/scala/list/P23Suite.scala rename to problems/list/test/src/P23Suite.scala diff --git a/src/test/scala/list/P24Suite.scala b/problems/list/test/src/P24Suite.scala similarity index 100% rename from src/test/scala/list/P24Suite.scala rename to problems/list/test/src/P24Suite.scala diff --git a/src/test/scala/list/P25Suite.scala b/problems/list/test/src/P25Suite.scala similarity index 100% rename from src/test/scala/list/P25Suite.scala rename to problems/list/test/src/P25Suite.scala diff --git a/src/test/scala/list/P26Suite.scala b/problems/list/test/src/P26Suite.scala similarity index 100% rename from src/test/scala/list/P26Suite.scala rename to problems/list/test/src/P26Suite.scala diff --git a/src/test/scala/list/P27Suite.scala b/problems/list/test/src/P27Suite.scala similarity index 100% rename from src/test/scala/list/P27Suite.scala rename to problems/list/test/src/P27Suite.scala diff --git a/src/test/scala/list/P28Suite.scala b/problems/list/test/src/P28Suite.scala similarity index 100% rename from src/test/scala/list/P28Suite.scala rename to problems/list/test/src/P28Suite.scala diff --git a/src/main/scala/logic/P46.scala b/problems/logic/src/P46.scala similarity index 100% rename from src/main/scala/logic/P46.scala rename to problems/logic/src/P46.scala diff --git a/src/main/scala/logic/P47.scala b/problems/logic/src/P47.scala similarity index 100% rename from src/main/scala/logic/P47.scala rename to problems/logic/src/P47.scala diff --git a/src/main/scala/logic/P49.scala b/problems/logic/src/P49.scala similarity index 100% rename from src/main/scala/logic/P49.scala rename to problems/logic/src/P49.scala diff --git a/src/main/scala/logic/P50.scala b/problems/logic/src/P50.scala similarity index 100% rename from src/main/scala/logic/P50.scala rename to problems/logic/src/P50.scala diff --git a/src/test/scala/logic/P46Suite.scala b/problems/logic/test/src/P46Suite.scala similarity index 100% rename from src/test/scala/logic/P46Suite.scala rename to problems/logic/test/src/P46Suite.scala diff --git a/src/test/scala/logic/P47Suite.scala b/problems/logic/test/src/P47Suite.scala similarity index 100% rename from src/test/scala/logic/P47Suite.scala rename to problems/logic/test/src/P47Suite.scala diff --git a/src/test/scala/logic/P49Spec.scala b/problems/logic/test/src/P49Spec.scala similarity index 100% rename from src/test/scala/logic/P49Spec.scala rename to problems/logic/test/src/P49Spec.scala diff --git a/src/test/scala/logic/P50Spec.scala b/problems/logic/test/src/P50Spec.scala similarity index 100% rename from src/test/scala/logic/P50Spec.scala rename to problems/logic/test/src/P50Spec.scala diff --git a/project/build.properties b/project/build.properties deleted file mode 100644 index e8a1e24..0000000 --- a/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.9.7 diff --git a/project/plugins.sbt b/project/plugins.sbt deleted file mode 100644 index f02b4bb..0000000 --- a/project/plugins.sbt +++ /dev/null @@ -1 +0,0 @@ -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") \ No newline at end of file diff --git a/versions.mill b/versions.mill new file mode 100644 index 0000000..52199fd --- /dev/null +++ b/versions.mill @@ -0,0 +1,5 @@ +package build + +val scalaVersion = "3.6.2" +val munitVersion = "1.0.3" +val munitScalaCheckVersion = "1.0.0" \ No newline at end of file