diff --git a/build-with-docker.sh b/build-with-docker.sh index c2cc34110e..9bc3f10eb6 100755 --- a/build-with-docker.sh +++ b/build-with-docker.sh @@ -7,4 +7,4 @@ docker run \ -e HOME=/opt/sbt/home \ -w /src \ --rm -it wavesplatform/node-sbt-builder:$WAVES_VERSION \ - /bin/sh -c "sbt --batch --mem 2048 packageAll" + /bin/sh -c "sbt --batch --mem 4096 packageAll" diff --git a/build.sbt b/build.sbt index f56a44abf2..9e4f5eb60f 100644 --- a/build.sbt +++ b/build.sbt @@ -168,7 +168,6 @@ inScope(Global)( network := Network.default(), instrumentation := false, resolvers ++= Resolver.sonatypeOssRepos("releases") ++ Resolver.sonatypeOssRepos("snapshots") ++ Seq(Resolver.mavenLocal), - Compile / doc / sources := Seq.empty, Compile / packageDoc / publishArtifact := false, concurrentRestrictions := Seq(Tags.limit(Tags.Test, math.min(EvaluateTask.SystemProcessors, 8))), excludeLintKeys ++= Set( diff --git a/lang/jvm/build.sbt b/lang/jvm/build.sbt index 25f4f660a3..1a9664f9a2 100644 --- a/lang/jvm/build.sbt +++ b/lang/jvm/build.sbt @@ -1,5 +1,15 @@ -ThisProject / publishTo := sonatypePublishToBundle.value -ThisProject / publish / skip := false +publishTo := sonatypePublishToBundle.value +publish / skip := false +homepage := Some(url("https://docs.waves.tech/en/ride/")) +developers := List( + Developer("ismagin", "Ilya Smagin", "ilya.smagin@gmail.com", url("https://github.com/ismagin")), + Developer("asayadyan", "Artyom Sayadyan", "xrtm000@gmail.com", url("https://github.com/xrtm000")), + Developer("mpotanin", "Mike Potanin", "mpotanin@wavesplatform.com", url("https://github.com/potan")), + Developer("irakitnykh", "Ivan Rakitnykh", "mrkr.reg@gmail.com", url("https://github.com/mrkraft")) +) + +Compile / packageDoc / publishArtifact := true +Test / packageDoc / publishArtifact := false inTask(assembly)( Seq( diff --git a/node/build.sbt b/node/build.sbt index 7c9e0642b4..a7370fa1b1 100644 --- a/node/build.sbt +++ b/node/build.sbt @@ -33,29 +33,7 @@ inConfig(Compile)( ) ) -inTask(assembly)( - Seq( - test := {}, - assemblyJarName := s"waves-all-${version.value}.jar", - assemblyMergeStrategy := { - case p - if p.endsWith(".proto") || - p.endsWith("module-info.class") || - p.endsWith("io.netty.versions.properties") || - p.endsWith(".kotlin_module") => - MergeStrategy.discard - - case "scala-collection-compat.properties" => - MergeStrategy.discard - case p - if Set("scala/util/control/compat", "scala/collection/compat") - .exists(p.replace('\\', '/').contains) => - MergeStrategy.last - - case other => (assembly / assemblyMergeStrategy).value(other) - } - ) -) +inTask(assembly)(CommonSettings.assemblySettings) // Adds "$lib_dir/*" to app_classpath in the executable file, this is needed for extensions scriptClasspath += "*" diff --git a/project/CommonSettings.scala b/project/CommonSettings.scala index db0472ff95..ed9b3a2a44 100644 --- a/project/CommonSettings.scala +++ b/project/CommonSettings.scala @@ -1,14 +1,36 @@ -import sbt.Keys._ -import sbt._ +import sbt.* +import sbt.Keys.{test, version, name} +import sbtassembly.AssemblyKeys.{assembly, assemblyMergeStrategy} +import sbtassembly.AssemblyPlugin.autoImport.assemblyJarName +import sbtassembly.{MergeStrategy, PathList} object CommonSettings extends AutoPlugin { object autoImport extends CommonKeys - import autoImport._ override def trigger: PluginTrigger = allRequirements // These options doesn't work for ScalaJS - override def projectSettings: Seq[Def.Setting[_]] = Seq() + override def projectSettings: Seq[Def.Setting[?]] = Seq() + + val assemblySettings: Seq[Def.Setting[?]] = Seq( + assemblyJarName := s"${name.value}-all-${version.value}.jar", + test := {}, + assemblyMergeStrategy := { + case p + if p.endsWith(".proto") || + p.endsWith("module-info.class") || + p.endsWith("io.netty.versions.properties") || + p.endsWith(".kotlin_module") => + MergeStrategy.discard + + case "scala-collection-compat.properties" => + MergeStrategy.discard + + case "logback.xml" | PathList("scala", "util", "control", "compat") | PathList("scala", "collection", "compat") | + PathList("swagger-ui", "openapi.yaml") => + MergeStrategy.last + case other => (assembly / assemblyMergeStrategy).value(other) + }) } trait CommonKeys { diff --git a/ride-runner/build.sbt b/ride-runner/build.sbt index 7c739a2f5f..63384aa177 100644 --- a/ride-runner/build.sbt +++ b/ride-runner/build.sbt @@ -86,28 +86,8 @@ inConfig(Debian)( // Fat JAR settings inTask(assembly)( - Seq( - test := {}, - mainClass := Some("com.wavesplatform.ride.runner.entrypoints.WavesRideRunnerWithPreparedStateApp"), - assemblyJarName := s"waves-ride-runner-all-${version.value}.jar", - assemblyMergeStrategy := { - case p - if p.endsWith(".proto") || - p.endsWith("module-info.class") || - p.endsWith("io.netty.versions.properties") || - p.endsWith(".kotlin_module") => - MergeStrategy.discard - - case "scala-collection-compat.properties" => - MergeStrategy.discard - case p - if Set("scala/util/control/compat", "scala/collection/compat") - .exists(p.replace('\\', '/').contains) => - MergeStrategy.last - - case "logback.xml" | "swagger-ui/openapi.yaml" => MergeStrategy.last - - case other => (assembly / assemblyMergeStrategy).value(other) - } - ) + CommonSettings.assemblySettings ++ + Seq( + mainClass := Some("com.wavesplatform.ride.runner.entrypoints.WavesRideRunnerWithPreparedStateApp") + ) )