Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: twitter/bazel-multiversion
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0-M31
Choose a base ref
...
head repository: twitter/bazel-multiversion
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jun 7, 2021

  1. Fix tests

    eed3si9n committed Jun 7, 2021
    Copy the full SHA
    303ba6d View commit details
  2. Merge pull request #96 from eed3si9n/wip/tests

    Fix tests
    eed3si9n authored Jun 7, 2021
    Copy the full SHA
    f66f990 View commit details

Commits on Sep 22, 2021

  1. Organization name

    eed3si9n committed Sep 22, 2021
    Copy the full SHA
    32c5180 View commit details
  2. Merge pull request #97 from eed3si9n/wip/organization

    Organization name
    eed3si9n authored Sep 22, 2021
    Copy the full SHA
    1d2b895 View commit details

Commits on Sep 27, 2021

  1. sbt-protobuf 0.7.0

    eed3si9n committed Sep 27, 2021
    Copy the full SHA
    7d9192a View commit details
  2. Merge pull request #98 from eed3si9n/wip/sbt-protobuf

    sbt-protobuf 0.7.0
    eed3si9n authored Sep 27, 2021
    Copy the full SHA
    e14b3b4 View commit details

Commits on Sep 30, 2021

  1. BUILDish DSL

    This adds `import-build` command as a new way of configuring
    dependencies using BUILDish DSL.
    This uses Starlark to evaluate `BUILD` files containing
    `jar_library(...)` calls.
    eed3si9n committed Sep 30, 2021
    Copy the full SHA
    e02d004 View commit details

Commits on Oct 1, 2021

  1. Merge pull request #99 from eed3si9n/wip/starlark

    BUILDish DSL
    eed3si9n authored Oct 1, 2021
    Copy the full SHA
    48d6b7c View commit details

Commits on Oct 10, 2021

  1. Build on tag

    eed3si9n committed Oct 10, 2021
    Copy the full SHA
    8f15ddd View commit details
  2. Merge pull request #100 from eed3si9n/wip/dynver

    Build on tag
    eed3si9n authored Oct 10, 2021
    Copy the full SHA
    dfb43e9 View commit details
  3. Fix BUILDish on GraalVM native image

    Problem
    -------
    0.1.0 can't import BUILDish.
    I originally tested only using JVM artifact, for native image requires a
    helper file to register reflection.
    eed3si9n committed Oct 10, 2021
    Copy the full SHA
    95a06c5 View commit details
  4. Merge pull request #101 from eed3si9n/wip/native_image

    Fix BUILDish on GraalVM native image
    eed3si9n authored Oct 10, 2021
    Copy the full SHA
    9309fee View commit details
  5. Bump to 0.1.1

    eed3si9n committed Oct 10, 2021
    Copy the full SHA
    5073564 View commit details

Commits on Dec 7, 2021

  1. Scalafmt 3.0.0-RC7

    eed3si9n committed Dec 7, 2021
    Copy the full SHA
    1a23018 View commit details
  2. Merge pull request #102 from eed3si9n/wip/scalafmt

    Scalafmt 3.0.0-RC7
    eed3si9n authored Dec 7, 2021
    Copy the full SHA
    24c09d0 View commit details

Commits on Dec 8, 2021

  1. Resolve source JARs

    This includes source JAR reference to scala_import.
    eed3si9n committed Dec 8, 2021
    Copy the full SHA
    cd0efc7 View commit details
  2. Merge pull request #103 from eed3si9n/wip/source_jars

    Resolve source JARs
    eed3si9n authored Dec 8, 2021
    Copy the full SHA
    d57d9f9 View commit details
  3. Copy the full SHA
    8a87865 View commit details

Commits on Dec 9, 2021

  1. Fix tests

    eed3si9n committed Dec 9, 2021
    Copy the full SHA
    3f161de View commit details
  2. Merge pull request #104 from eed3si9n/wip/sources_genrule

    Wrap sources JARs in genrule
    eed3si9n authored Dec 9, 2021
    Copy the full SHA
    4490f3a View commit details

Commits on Aug 22, 2022

  1. Copy the full SHA
    0421aef View commit details
  2. toSet

    eed3si9n committed Aug 22, 2022
    Copy the full SHA
    55bc406 View commit details
  3. Merge pull request #106 from eed3si9n/wip/bazel5

    Update example to Bazel 5.1.0
    eed3si9n authored Aug 22, 2022
    Copy the full SHA
    d299d93 View commit details

Commits on Aug 23, 2022

  1. Implement rules_jvm_export

    This implements rules_jvm_export, a Bazel rule to publish build
    artifacts to a Maven repository.
    Given that there's already [vaticle/bazel-distribution][1] rule,
    why make another one?
    The Maven-related rules in bazel-distribution has a good foundation
    so we are basing this rule off of it, but it does things that we
    don't need, and it doesn't do certain things we do want.
    Here are the main differences:
    
    - bazel-distribution uses Kotlin and Python to implement helper programs.
      This requires rules_kotlin to be introduced to `WORKSPACE`.
      rules_jvm_export only uses Python instead.
    - bazel-distribution creates an über JAR in the `assemble_maven(...)` rule,
      which includes classes coming from the dependencies.
      The jar_assembler seems to skip over `META-INF`, potentially losing info.
      rules_jvm_export by default uses the normal `build` artifacts.
    - rules_jvm_export just needs one target `jvm_export(...)` instead of
      `assemble_maven(...)` and `deploy_maven(...)`, in part because we're
      not creating assembly JAR by default.
      This is similar to rules_jvm_external's approach.
    - bazel-distribution uses a text file called `VERSION` to track the
      version number. rules_jvm_export introduces
      `jvm_export_version(...)` setting to track version numbers.
      These can be overridden from the command line without using `--define`.
    
    Here are the new features:
    
    - Support for bazel-multiversion 3rdparty targets.
    - `--netrc` option to use `.netrc` for authentication instead of
      environment variables.
    - rules_jvm_export supports file copying to local M2 repo.
      `--local` option can be passed to `bazel run` to publish to M2.
    
      [1]: https://github.com/vaticle/bazel-distribution
    eed3si9n committed Aug 23, 2022
    Copy the full SHA
    f839564 View commit details
  2. Merge pull request #105 from eed3si9n/wip/jvm_export

    Implement rules_jvm_export
    eed3si9n authored Aug 23, 2022
    Copy the full SHA
    65fe4a6 View commit details

Commits on Aug 24, 2022

  1. Fix POM gen

    Dependency version number for non-thirtparty nodes are not properly
    substituted.
    This fixes that.
    eed3si9n committed Aug 24, 2022
    Copy the full SHA
    261aceb View commit details
  2. --publish_to support

    This lets you pass in repo URL or file path at the point of publishing
    as `--publish_to` parameter.
    eed3si9n committed Aug 24, 2022
    Copy the full SHA
    79b5d84 View commit details
  3. Merge pull request #107 from eed3si9n/wip/dep_version

    --publish_to support
    Angela Guardia authored Aug 24, 2022
    Copy the full SHA
    d79a807 View commit details

Commits on Aug 29, 2022

  1. Include only direct deps in POM

    Problem
    -------
    POM contains dependencies to what should be transitive dependencies.
    The implementation uses aspect to walk the dependency graph,
    and currently it lists out transitive dependencies in POM as well.
    
    Solution
    --------
    Remember the direct dependency in the aspect,
    and output only the direct dependencies in POM.
    eed3si9n committed Aug 29, 2022
    Copy the full SHA
    9034edc View commit details
  2. Ignore non-JVM targets along the dependency

    Ignore non-JVM targets along the dependency graph while creating
    assembly JAR.
    eed3si9n committed Aug 29, 2022
    Copy the full SHA
    1fac498 View commit details
  3. Merge pull request #108 from eed3si9n/wip/follow-up

    Include only direct deps in POM
    eed3si9n authored Aug 29, 2022
    Copy the full SHA
    ef1da0a View commit details

Commits on Sep 12, 2022

  1. Fix typo in POM generation

    eed3si9n committed Sep 12, 2022
    Copy the full SHA
    21eb1b0 View commit details
  2. Merge pull request #109 from eed3si9n/wip/typo

    Fix typo in POM generation
    eed3si9n authored Sep 12, 2022
    Copy the full SHA
    0a2acb1 View commit details

Commits on Sep 13, 2022

  1. classifier support

    Problem
    -------
    Publishing doesn't support custom classifiers.
    
    Solution
    --------
    Add classifier publishing by letting the build user encode the
    information into the maven_coordinates tag.
    For example, to publish a JAR file as `abc` classifier, tag it as
    `maven_coordinates=com.twitter.dpb:io3:jar:abc:{pom_version}`.
    `jvm_export(...)` will pick that up to publish it with `-abc.jar` name.
    eed3si9n committed Sep 13, 2022
    Copy the full SHA
    22aee51 View commit details

Commits on Sep 14, 2022

  1. Support DefaultInfo

    eed3si9n committed Sep 14, 2022
    Copy the full SHA
    524bff8 View commit details
  2. Merge pull request #110 from eed3si9n/wip/classifier

    classifier support
    eed3si9n authored Sep 14, 2022
    Copy the full SHA
    bb586d5 View commit details

Commits on Oct 12, 2022

  1. rules_scala Java library support

    Problem
    -------
    jvm_export assumes the target generates exactly one JAR file,
    but rules_scala actually creates two JAR files when there are
    Java files in the sources.
    
    Solution
    --------
    As a workaround, assume that the target only contains Java sources,
    and pick the file whose name ends in `_java.jar`.
    eed3si9n committed Oct 12, 2022
    Copy the full SHA
    29bf7a9 View commit details
  2. Merge pull request #111 from eed3si9n/wip/java_publishing

    rules_scala Java library support
    eed3si9n authored Oct 12, 2022
    Copy the full SHA
    103b642 View commit details

Commits on Nov 2, 2022

  1. Encode provided scope as neverlink

    Problem
    -------
    We want to emulate provided scope (compile scope in Pants)
    using neverlink, but the jvm_export rule is unaware of that.
    
    Solution
    --------
    Track neverlink attribute in the aspect and send them into
    the Python script as if it's a classifier.
    eed3si9n committed Nov 2, 2022
    Copy the full SHA
    dcdf9d8 View commit details

Commits on Nov 3, 2022

  1. Update rules_jvm_export/jvm_export/support/pom_generator.py

    Co-authored-by: Yi Cheng <wisechengyi@gmail.com>
    eed3si9n and wisechengyi authored Nov 3, 2022
    Copy the full SHA
    a25b671 View commit details
  2. Merge pull request #112 from eed3si9n/wip/neverlink

    Encode provided scope as neverlink
    eed3si9n authored Nov 3, 2022
    Copy the full SHA
    e1a00e3 View commit details

Commits on Nov 10, 2022

  1. Update Coursier

    eed3si9n committed Nov 10, 2022
    Copy the full SHA
    bcae700 View commit details
  2. Fix test output

    eed3si9n committed Nov 10, 2022
    Copy the full SHA
    4c994c9 View commit details
  3. Merge pull request #113 from eed3si9n/wip/bump

    Update Coursier to 2.1.0-RC1
    eed3si9n authored Nov 10, 2022
    Copy the full SHA
    bf29039 View commit details

Commits on Nov 14, 2022

  1. GraalVM 22.0

    eed3si9n committed Nov 14, 2022
    Copy the full SHA
    3f37f60 View commit details
  2. Merge pull request #114 from eed3si9n/wip/graalvm

    GraalVM 22.0
    eed3si9n authored Nov 14, 2022
    Copy the full SHA
    d1d0f0d View commit details

Commits on Feb 15, 2023

  1. Add arg to specify input configuration in export

    Previously, the `export` command would always read its input from
    `3rdparty.yaml`. This commit adds a new parameter, `--input-path`, which
    configures where to read the 3rdparty configuration from.
    
    If the input file name ends with `.json`, then a JSON parser is used,
    instead of the default YAML parser.
    Duhemm committed Feb 15, 2023
    Copy the full SHA
    f13aefa View commit details

Commits on Feb 17, 2023

  1. Merge pull request #115 from Duhemm/specify-input

    Add arg to specify input configuration in `export`
    Duhemm authored Feb 17, 2023
    Copy the full SHA
    393dcdd View commit details

Commits on Mar 6, 2023

  1. Fix jvm_export with no sources

    Previously, `jvm_export` rules with no sources (eg. a library that
    serves as an umbrella for several libraries) would fail during
    analysis with the following error:
    
    ```
    ERROR: /Users/me/work/lib/BUILD:60:14: in jvm_export rule //lib:lib.publish:
    Traceback (most recent call last):
            File "(...)/jvm_export/jvm_export.bzl", line 43, column 37, in _jvm_export_impl
                    source_jar = _source_jar(artifact)
            File "(...)/jvm_export/jvm_export.bzl", line 159, column 44, in _source_jar
                    return target[JavaInfo].source_jars[0]
    Error: index out of range (index is 0, but sequence has 0 elements)
    ```
    
    With this patch, the rule will no longer try to find a sources jar that
    doesn't exist.
    Duhemm committed Mar 6, 2023
    Copy the full SHA
    4433502 View commit details

Commits on Mar 10, 2023

  1. Merge pull request #117 from Duhemm/export-no-sources

    Fix `jvm_export` with no sources
    Duhemm authored Mar 10, 2023
    Copy the full SHA
    447c705 View commit details
Showing with 2,738 additions and 483 deletions.
  1. +8 −2 .github/workflows/ci.yml
  2. +3 −2 .scalafmt.conf
  3. +1 −1 DEVELOP.md
  4. +11 −0 NOTICE
  5. +55 −36 build.sbt
  6. +1 −0 multiversion-example/.bazelignore
  7. +1 −1 multiversion-example/.bazeliskrc
  8. +3 −0 multiversion-example/3rdparty/jvm/BUILD
  9. +26 −0 multiversion-example/3rdparty/jvm/com/google/guava/BUILD
  10. +11 −0 multiversion-example/3rdparty/jvm/com/google/protobuf/BUILD
  11. +10 −0 multiversion-example/3rdparty/jvm/org/apache/thrift/BUILD
  12. +11 −0 multiversion-example/3rdparty/jvm/org/scala-lang/BUILD
  13. +10 −0 multiversion-example/3rdparty/jvm/org/scalameta/BUILD
  14. +161 −95 multiversion-example/3rdparty/jvm_deps.bzl
  15. +13 −7 multiversion-example/WORKSPACE
  16. +42 −0 multiversion-example/bin/multiversion
  17. +163 −0 multiversion-example/export-example/BUILD
  18. +3 −0 multiversion-example/export-example/IO1.scala
  19. +3 −0 multiversion-example/export-example/IO2.scala
  20. +3 −0 multiversion-example/export-example/IO3.scala
  21. +3 −0 multiversion-example/export-example/IO4.scala
  22. +3 −0 multiversion-example/export-example/IO5.scala
  23. +11 −0 multiversion/reflect.config
  24. +1 −0 multiversion/src/main/scala/multiversion/MultiVersion.scala
  25. +93 −0 multiversion/src/main/scala/multiversion/buildish/Buildish.scala
  26. +140 −0 multiversion/src/main/scala/multiversion/buildish/Functions.scala
  27. +22 −0 multiversion/src/main/scala/multiversion/buildish/JarLibraryDef.scala
  28. +104 −67 multiversion/src/main/scala/multiversion/commands/ExportCommand.scala
  29. +65 −0 multiversion/src/main/scala/multiversion/commands/ImportBuildCommand.scala
  30. +26 −29 multiversion/src/main/scala/multiversion/commands/LintCommand.scala
  31. +6 −3 multiversion/src/main/scala/multiversion/configs/DependencyConfig.scala
  32. +2 −2 multiversion/src/main/scala/multiversion/configs/ForceVersionsConfig.scala
  33. +2 −1 multiversion/src/main/scala/multiversion/configs/ModuleConfig.scala
  34. +2 −2 multiversion/src/main/scala/multiversion/configs/MultidepsJsonDecoders.scala
  35. +24 −25 multiversion/src/main/scala/multiversion/configs/ThirdpartyConfig.scala
  36. +7 −5 multiversion/src/main/scala/multiversion/diagnostics/MultidepsEnrichments.scala
  37. +6 −6 multiversion/src/main/scala/multiversion/indexes/TargetIndex.scala
  38. +100 −19 multiversion/src/main/scala/multiversion/outputs/ArtifactOutput.scala
  39. +3 −4 multiversion/src/main/scala/multiversion/outputs/DepsOutput.scala
  40. +2 −3 multiversion/src/main/scala/multiversion/outputs/Docs.scala
  41. +64 −35 multiversion/src/main/scala/multiversion/outputs/ResolutionIndex.scala
  42. +4 −2 multiversion/src/main/scala/multiversion/resolvers/CoursierThreadPools.scala
  43. +4 −2 multiversion/src/main/scala/multiversion/resolvers/ResolvedDependency.scala
  44. +1 −1 project/build.properties
  45. +4 −3 project/plugins.sbt
  46. +127 −7 readme.md
  47. +62 −0 rules_jvm_export/README.md
  48. +1 −0 rules_jvm_export/WORKSPACE
  49. +13 −0 rules_jvm_export/jvm_export/BUILD
  50. +281 −0 rules_jvm_export/jvm_export/jvm_assembly.bzl
  51. +261 −0 rules_jvm_export/jvm_export/jvm_export.bzl
  52. +1 −0 rules_jvm_export/jvm_export/support/BUILD
  53. +216 −0 rules_jvm_export/jvm_export/support/deploy.py
  54. +48 −0 rules_jvm_export/jvm_export/support/jar_assembler.py
  55. +156 −0 rules_jvm_export/jvm_export/support/pom_generator.py
  56. +35 −0 scripts/ci-test.sh
  57. +24 −17 tests/src/main/scala/tests/BaseSuite.scala
  58. +113 −0 tests/src/test/scala/tests/buildish/BuildishTest.scala
  59. +102 −103 tests/src/test/scala/tests/commands/ExportCommandSuite.scala
  60. +5 −2 tests/src/test/scala/tests/commands/JarsCommandTest.scala
  61. +35 −0 tests/src/test/scala/tests/commands/ResolveCommandTest.scala
  62. +17 −0 tests/src/test/scala/tests/commands/SourceJarTest.scala
  63. +3 −1 tests/src/test/scala/tests/configs/WorkspaceConfigSuite.scala
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI
on:
push:
tags:
- '*'
branches:
- main
pull_request:
@@ -18,7 +20,9 @@ jobs:
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cd multiversion-example && bazel build tricky/...
- name: multiversion-example
shell: bash
run: scripts/ci-test.sh
- run: sbt test
graalnative:
name: GraalVM Native Image
@@ -44,7 +48,9 @@ jobs:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: sbt -v -Dfile.encoding=UTF8 nativeImage
run: |
sbt -v -Dfile.encoding=UTF8 nativeImage
chmod +x multiversion/target/native-image/multiversion
shell: bash
- name: Archive native image artifacts
uses: actions/upload-artifact@v2
5 changes: 3 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
version = "2.6.4"
version = "3.0.0-RC7"
runner.dialect = scala213source3
preset=default
maxColumn = 100
project.git = true
lineEndings = preserve

# https://docs.scala-lang.org/style/scaladoc.html recommends the JavaDoc style.
# scala/scala is written that way too https://github.com/scala/scala/blob/v2.12.2/src/library/scala/Predef.scala
docstrings = JavaDoc
docstrings.style = Asterisk

# This also seems more idiomatic to include whitespace in import x.{ yyy }
spaces.inImportCurlyBraces = true
2 changes: 1 addition & 1 deletion DEVELOP.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ $ sbt
....
> exit

$ cs launch org.scalameta:bazel-multiversion_2.12:0.1.0-SNAPSHOT --main-class multiversion.MultiVersion -- help
$ cs launch com.twitter.multiversion:bazel-multiversion_2.12:0.1.0-SNAPSHOT --main-class multiversion.MultiVersion -- help
```


11 changes: 11 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -208,3 +208,14 @@ We include the text of the original license below.
See the License for the specific language governing permissions and
limitations under the License.
```

# License notice for bazel-distribution

This project contains parts which are derived from
[bazel-distribution](https://github.com/vaticle/bazel-distribution).
Specifically rules_jvm_export was copy-pasted from
https://github.com/vaticle/bazel-distribution/blob/master/maven/rules.bzl
and adapted to the needs of this project.

bazel-distribution is developed by Vatice, and licensed under Apache License 2.0.

91 changes: 55 additions & 36 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,40 +1,57 @@
lazy val V = new {
def scala212 = "2.12.12"
def scala212 = "2.12.17"
def moped = "0.1.9"
}

inThisBuild(
List(
organization := "org.scalameta",
homepage := Some(url("https://github.com/twitter/bazel-multiversion")),
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
),
developers := List(
Developer(
"eed3si9n",
"Eugene Yokota",
"@eed3si9n",
url("https://eed3si9n.com")
),
Developer(
"olafurpg",
"Ólafur Páll Geirsson",
"olafurpg@gmail.com",
url("https://geirsson.com")
)
),
scalaVersion := V.scala212,
scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.2",
scalafixCaching := true,
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
scalacOptions ++= List(
"-Ywarn-unused:imports",
"-Yrangepos"
),
version := "0.1.0-SNAPSHOT"
)
ThisBuild / organization := "com.twitter.multiversion"
ThisBuild / version := {
val snapshotV = "0.1.0-SNAPSHOT"
val old = (ThisBuild / version).value
(sys.env.get("BUILD_VERSION") orElse sys.props.get("sbt.build.version")) match {
case Some(v) => v
case _ =>
if ((ThisBuild / isSnapshot).value) snapshotV
else old
}
}
ThisBuild / homepage := Some(url("https://github.com/twitter/bazel-multiversion"))
ThisBuild / licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
)
ThisBuild / developers := List(
Developer(
"eed3si9n",
"Eugene Yokota",
"@eed3si9n",
url("https://eed3si9n.com")
),
Developer(
"Duhemm",
"Martin Duhem",
"@Duhemm",
url("https://github.com/Duhemm")
),
Developer(
"AngelaGuardia",
"Angela Guardia",
"@AngelaGuardia",
url("https://github.com/AngelaGuardia")
),
Developer(
"olafurpg",
"Ólafur Páll Geirsson",
"olafurpg@gmail.com",
url("https://geirsson.com")
),
)
ThisBuild / scalaVersion := V.scala212
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.2"
ThisBuild / scalafixCaching := true
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
ThisBuild / scalacOptions ++= List(
"-Ywarn-unused:imports",
"-Yrangepos"
)

lazy val multiversion = project
@@ -53,24 +70,26 @@ lazy val multiversion = project
baseDirectory.in(ThisBuild).value / "multiversion-example"
},
libraryDependencies ++= List(
"io.get-coursier" %% "coursier" % "2.0.0",
"io.get-coursier" %% "coursier" % "2.1.0-RC1",
"io.get-coursier" %% "versions" % "0.3.1",
"org.scalameta" %% "moped" % V.moped,
"org.scalameta" %% "moped-yaml" % V.moped,
"com.lihaoyi" %% "os-lib" % "0.7.1",
"com.lihaoyi" %% "fansi" % "0.2.9",
"com.lihaoyi" %% "pprint" % "0.6.0",
"com.lihaoyi" %% "requests" % "0.6.5"
"com.lihaoyi" %% "requests" % "0.6.5",
"com.eed3si9n.starlark" % "starlark" % "4.2.1",
),
buildInfoPackage := "multiversion",
buildInfoKeys := Seq[BuildInfoKey](
version
),
name.in(NativeImage) := "multiversion",
nativeImageVersion := "22.0",
nativeImageOptions ++= List(
"--initialize-at-build-time=scala.collection.immutable.VM",
"--initialize-at-run-time=multiversion,moped.cli.Environment$",
"-H:+TraceClassInitialization",
s"-H:ReflectionConfigurationFiles=${baseDirectory.value}/reflect.config",
"--enable-http",
"--enable-https",
"--report-unsupported-elements-at-runtime"
1 change: 1 addition & 0 deletions multiversion-example/.bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3rdparty/jvm/
2 changes: 1 addition & 1 deletion multiversion-example/.bazeliskrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
USE_BAZEL_VERSION=3.6.0
USE_BAZEL_VERSION=5.1.0
3 changes: 3 additions & 0 deletions multiversion-example/3rdparty/jvm/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
multiversion_config(
scala_versions = ["2.12.12"],
)
26 changes: 26 additions & 0 deletions multiversion-example/3rdparty/jvm/com/google/guava/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
jar_library(
name = "guava",
jars = [
jar(
org = "com.google.guava",
name = "guava",
rev = "29.0-jre",
)
],
)

jar_library(
name = "guava-24",
jars = [
jar(
org = "com.google.guava",
name = "guava",
rev = "24.1.1-jre",
),
jar(
org = "org.checkerframework",
name = "checker-compat-qual",
rev = "2.0.0",
)
],
)
11 changes: 11 additions & 0 deletions multiversion-example/3rdparty/jvm/com/google/protobuf/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
jar_library(
name = "protobuf-java",
jars = [
jar(
org = "com.google.protobuf",
name = "protobuf-java",
rev = "3.13.0",
)
],
version_scheme = "semver-spec",
)
10 changes: 10 additions & 0 deletions multiversion-example/3rdparty/jvm/org/apache/thrift/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
jar_library(
name = "libthrift",
jars = [
jar(
org = "org.apache.thrift",
name = "libthrift",
rev = "0.10.0",
)
],
)
11 changes: 11 additions & 0 deletions multiversion-example/3rdparty/jvm/org/scala-lang/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
jar_library(
name = "scala-library",
jars = [
jar(
org = "org.scala-lang",
name = "scala-library",
rev = "2.12.12",
)
],
version_scheme = "pvp",
)
10 changes: 10 additions & 0 deletions multiversion-example/3rdparty/jvm/org/scalameta/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
jar_library(
name = "scalameta",
jars = [
scala_jar(
org = "org.scalameta",
name = "scalameta",
rev = "4.0.0",
)
],
)
Loading