Skip to content

Commit

Permalink
Use perTestResources to depend on squery in itest
Browse files Browse the repository at this point in the history
  • Loading branch information
sake92 committed Aug 19, 2024
1 parent 522d5ff commit 62901e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 10 additions & 0 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ object `mill-plugin-itest` extends MillIntegrationTestModule {
)
)
}

override def perTestResources = T.sources {
os.write(
T.dest / "versions.sc",
s"""object Versions {
val squery = "${squery.publishVersion()}"
}"""
)
Seq(PathRef(T.dest))
}
}

/* DOCS */
Expand Down
12 changes: 2 additions & 10 deletions mill-plugin-itest/src/h2/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import $ivy.`org.scalameta::munit:0.7.29`
import $ivy.`com.lihaoyi::mill-contrib-flyway:`
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
import $file.plugins
import $file.versions

import mill._, scalalib._
import de.tobiasroeser.mill.vcs.version.VcsVersion
Expand All @@ -16,18 +17,9 @@ object root extends ScalaModule with SqueryGeneratorModule with FlywayModule {
def ivyDeps = Agg(
ivy"com.zaxxer:HikariCP:4.0.3",
ivy"com.h2database:h2:2.3.232",
ivy"ba.sake::squery:0.3.0-14-8c8556-SNAPSHOT" // TODO remove after https://github.com/lefou/mill-integrationtest/issues/198
ivy"ba.sake::squery:${versions.Versions.squery}"
)

// TODO remove after https://github.com/lefou/mill-integrationtest/issues/198
def repositoriesTask = T.task {
super
.repositoriesTask()
.appended(
coursier.maven.MavenRepository("https://oss.sonatype.org/content/repositories/snapshots")
)
}

def flywayDriverDeps = Agg(ivy"com.h2database:h2:2.3.232")
def flywayUrl = "jdbc:h2:./h2_pagila"

Expand Down

0 comments on commit 62901e8

Please sign in to comment.