Skip to content

Commit f8f2579

Browse files
lolgabGedochao
andauthored
Simplify build (#2512)
Co-authored-by: Piotr Chabelski <[email protected]>
1 parent e785630 commit f8f2579

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

build.sc

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ trait Cli extends SbtModule with ProtoBuildModule with CliLaunchers
834834
workingDir = os.pwd
835835
)
836836
val cp = res.out.trim()
837-
cp.split(File.pathSeparator).toSeq.map(p => mill.PathRef(os.Path(p)))
837+
cp.split(File.pathSeparator).toSeq.map(p => PathRef(os.Path(p)))
838838
}
839839

840840
def localRepoJar = `local-repo`.localRepoJar()
@@ -869,20 +869,6 @@ trait CliIntegration extends SbtModule with ScalaCliPublishModule with HasTests
869869
super.scalacOptions() ++ Seq("-Xasync", "-deprecation")
870870
}
871871

872-
def modulesPath = T {
873-
val name = mainArtifactName().stripPrefix(prefix)
874-
val baseIntegrationPath = os.Path(millSourcePath.toString.stripSuffix(name))
875-
baseIntegrationPath.toString.stripSuffix(baseIntegrationPath.baseName)
876-
}
877-
def sources = T.sources {
878-
val mainPath = PathRef(os.Path(modulesPath()) / "integration" / "src" / "main" / "scala")
879-
super.sources() ++ Seq(mainPath)
880-
}
881-
def resources = T.sources {
882-
val mainPath = PathRef(os.Path(modulesPath()) / "integration" / "src" / "main" / "resources")
883-
super.resources() ++ Seq(mainPath)
884-
}
885-
886872
def ivyDeps = super.ivyDeps() ++ Agg(
887873
Deps.osLib
888874
)
@@ -909,25 +895,6 @@ trait CliIntegration extends SbtModule with ScalaCliPublishModule with HasTests
909895
"SCALA_CLI_PRINT_STACK_TRACES" -> "1",
910896
"SCALA_CLI_CONFIG" -> (tmpDirBase().path / "config" / "config.json").toString
911897
)
912-
private def updateRef(name: String, ref: PathRef): PathRef = {
913-
val rawPath = ref.path.toString.replace(
914-
File.separator + name + File.separator,
915-
File.separator
916-
)
917-
PathRef(os.Path(rawPath))
918-
}
919-
def sources = T.sources {
920-
val name = mainArtifactName().stripPrefix(prefix)
921-
super.sources().flatMap { ref =>
922-
Seq(updateRef(name, ref), ref)
923-
}
924-
}
925-
def resources = T.sources {
926-
val name = mainArtifactName().stripPrefix(prefix)
927-
super.resources().flatMap { ref =>
928-
Seq(updateRef(name, ref), ref)
929-
}
930-
}
931898

932899
def constantsFile = T.persistent {
933900
val dir = T.dest / "constants"

0 commit comments

Comments
 (0)