forked from UltraVanilla/UltraVanilla
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
46 lines (41 loc) · 1.62 KB
/
build.sbt
File metadata and controls
46 lines (41 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
scalaVersion := "2.13.5"
organization := "world.ultravanilla"
version := "1.34"
name := "UltraVanilla"
resolvers ++= List(
"jitpack.io" at "https://jitpack.io",
"papermc" at "https://papermc.io/repo/repository/maven-public/",
"dmulloy2-repo" at "https://repo.dmulloy2.net/nexus/repository/public/",
"jcenter" at "https://jcenter.bintray.com",
"m2-dv8tion" at "https://m2.dv8tion.net/releases"
)
libraryDependencies ++= List(
"com.destroystokyo.paper" % "paper-api" % "1.16.5-R0.1-SNAPSHOT" % Provided,
"net.luckperms" % "api" % "5.3" % Provided,
"net.dv8tion" % "JDA" % "4.3.0_277" exclude("club.minnced", "opus-java")
)
scalacOptions += "-target:16"
javacOptions ++= Seq("-source", "16", "-target", "16")
Compile / resourceGenerators += Def.task {
val file = (Compile / resourceManaged).value / "plugin.yml"
val pluginConfig = scala.io.Source.fromFile("plugin.yml").getLines.mkString("\n")
val contents = pluginConfig.replace("@VERSION@", version.value)
IO.write(file, contents)
Seq(file)
}.taskValue
assembly / assemblyMergeStrategy := {
case "module-info.class" => MergeStrategy.first
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}
val sbtDefaultTarget = System.getProperty("sbtDefaultTarget", "false")
val sbtOutputDirectory = System.getProperty("sbtOutputDirectory", "testserver/plugins")
assembly / assemblyOutputPath := {
val default = (assembly / assemblyOutputPath).value
if (sbtDefaultTarget == "true") {
default
} else {
file(sbtOutputDirectory + "/" + name.value + "-" + version.value + ".jar")
}
}