diff --git a/build.sbt b/build.sbt index 8d4a464c..72e683d4 100644 --- a/build.sbt +++ b/build.sbt @@ -2,40 +2,17 @@ import sbt._ import BuildSettings._ import Dependencies._ -import Bundle._ -Global / githubPath := "gatling/gatling-highcharts" -Global / gatlingDevelopers := Seq( +githubPath := "gatling/gatling-highcharts" +gatlingDevelopers := Seq( GatlingDeveloper("slandelle@gatling.io", "Stephane Landelle", isGatlingCorp = true), GatlingDeveloper("gcorre@gatling.io", "Guillaume Corré", isGatlingCorp = true) ) -Global / scalaVersion := "2.13.12" +scalaVersion := "2.13.12" ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org" -// Root project - -lazy val root = Project("gatling-highcharts", file(".")) +lazy val root = (project in file(".")) .enablePlugins(GatlingOssPlugin) - .aggregate(gatlingChartsHighcharts, gatlingHighchartsBundle) - .settings(basicSettings) - .settings(publish / skip := true) - -// Modules - -def gatlingHighchartsModule(id: String) = - Project(id, file(id)) - .enablePlugins(GatlingOssPlugin) - .settings(basicSettings ++ CodeAnalysis.settings) - -lazy val gatlingChartsHighcharts = gatlingHighchartsModule("gatling-charts-highcharts") + .settings(name := "gatling-charts-highcharts") + .settings(basicSettings ++ CodeAnalysis.settings) .settings(libraryDependencies ++= gatlingChartsHighchartsDeps(version.value)) - .settings(exportJars := true) - -lazy val gatlingHighchartsBundle = gatlingHighchartsModule("gatling-charts-highcharts-bundle") - .dependsOn(gatlingChartsHighcharts) - .enablePlugins(UniversalPlugin) - .settings(libraryDependencies ++= gatlingHighchartsBundleDeps(version.value, scalaVersion.value)) - .settings(bundleSettings: _*) - .settings(packageDoc / publishArtifact := false) // no javadoc - .settings(packageSrc / publishArtifact := false) // no source - .settings(packageBin / publishArtifact := false) // no jar (only the bundle.zip remains) diff --git a/gatling-charts-highcharts/src/test/scala/.keep b/gatling-charts-highcharts/src/test/scala/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/project/Bundle.scala b/project/Bundle.scala deleted file mode 100644 index ed21f5e1..00000000 --- a/project/Bundle.scala +++ /dev/null @@ -1,52 +0,0 @@ -import sbt._ -import sbt.Keys._ -import sbt.internal.inc.classpath.ClasspathUtil -import com.typesafe.sbt.SbtNativePackager._ -import autoImport._ -import NativePackagerHelper._ -import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.useNativeZip - -object Bundle { - val gatlingJars = taskKey[Seq[File]]("List of all Gatling jars needed for the bundle") - val bundleFile = taskKey[File]("Path of gatling-bundle") - val unzippedBundleLocation = settingKey[File]("Directory where bundle is unzipped") - - val bundleArtifacts = { - def bundleArtifact(ext: String) = Artifact("gatling-charts-highcharts-bundle", ext, ext, "bundle") - - Seq( - addArtifact(bundleArtifact("zip"), Universal / packageBin) - ).flatMap(_.settings) - } - - val bundleSettings = bundleArtifacts ++ Seq( - gatlingJars := (Runtime / fullClasspath).value.map(_.data).filter(file => ClasspathUtil.isArchive(file.toPath)), - Universal / mappings ++= gatlingJars.value.map(jar => jar -> buildDestinationJarPath("lib", jar, version.value, scalaVersion.value)), - bundleFile := update.value.select(artifact = artifactFilter(classifier = "bundle")).head, - unzippedBundleLocation := target.value / "unzipped", - Universal / mappings ++= zipFileMappings.value - ) ++ useNativeZip - - def zipFileMappings = - Def.task { - IO.unzip(bundleFile.value, unzippedBundleLocation.value) - val location = unzippedBundleLocation.value.listFiles.head - // IO.unzip seems to "forget" file permissions, reset them after unzipping - (location / "bin").allPaths.get.map(_.setExecutable(true)) - val finder = location.allPaths --- location - finder pair relativeTo(location) - } - - def buildDestinationJarPath(folder: String, sourceJarPath: File, gatlingVersion: String, scalaVersion: String): String = - if ( - sourceJarPath.getName.startsWith("gatling") && !sourceJarPath.getName - .contains(gatlingVersion) && !sourceJarPath.getName - .startsWith("gatling-enterprise-plugin-commons") && !sourceJarPath.getName.startsWith("gatling-recorder-bc") - ) { - s"$folder/${sourceJarPath.base}-$gatlingVersion.${sourceJarPath.ext}" - } else if (Set("scala-library.jar", "scala-reflect.jar", "scala-compiler.jar").contains(sourceJarPath.getName)) { - s"$folder/${sourceJarPath.base}-$scalaVersion.${sourceJarPath.ext}" - } else { - s"$folder/${sourceJarPath.getName}" - } -} diff --git a/project/Dependencies.scala b/project/Dependencies.scala index bfc24fbd..0f4ffccc 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -1,19 +1,11 @@ import sbt._ object Dependencies { - private val bundleArtifact = Artifact("gatling-bundle", "zip", "zip", "bundle") - // format: OFF def app(gatlingVersion: String) = "io.gatling" % "gatling-app" % gatlingVersion - def compiler(gatlingVersion: String) = "io.gatling" % "gatling-compiler" % gatlingVersion def recorder(gatlingVersion: String) = "io.gatling" % "gatling-recorder" % gatlingVersion - def bundleJar(gatlingVersion: String) = "io.gatling" % "gatling-bundle" % gatlingVersion - def bundle(gatlingVersion: String) = "io.gatling" % "gatling-bundle" % gatlingVersion artifacts bundleArtifact // format: ON def gatlingChartsHighchartsDeps(version: String) = Seq(app _, recorder _).map(_(version)) - - def gatlingHighchartsBundleDeps(gatlingVersion: String, scalaVersion: String) = - Seq(bundle _, compiler _, bundleJar _).map(_(gatlingVersion)) } diff --git a/project/plugins.sbt b/project/plugins.sbt index 65f78c43..c3475b5e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,2 @@ addSbtPlugin("io.gatling" % "gatling-build-plugin" % "6.1.1") -addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16") addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.1.6") diff --git a/gatling-charts-highcharts/src/main/resources/META-INF/LICENSE b/src/main/resources/META-INF/LICENSE similarity index 100% rename from gatling-charts-highcharts/src/main/resources/META-INF/LICENSE rename to src/main/resources/META-INF/LICENSE diff --git a/gatling-charts-highcharts/src/main/resources/META-INF/services/io.gatling.charts.component.ComponentLibrary b/src/main/resources/META-INF/services/io.gatling.charts.component.ComponentLibrary similarity index 100% rename from gatling-charts-highcharts/src/main/resources/META-INF/services/io.gatling.charts.component.ComponentLibrary rename to src/main/resources/META-INF/services/io.gatling.charts.component.ComponentLibrary diff --git a/gatling-charts-highcharts/src/main/resources/io/gatling/charts/assets/js/highcharts-more.js b/src/main/resources/io/gatling/charts/assets/js/highcharts-more.js similarity index 100% rename from gatling-charts-highcharts/src/main/resources/io/gatling/charts/assets/js/highcharts-more.js rename to src/main/resources/io/gatling/charts/assets/js/highcharts-more.js diff --git a/gatling-charts-highcharts/src/main/resources/io/gatling/charts/assets/js/highstock.js b/src/main/resources/io/gatling/charts/assets/js/highstock.js similarity index 100% rename from gatling-charts-highcharts/src/main/resources/io/gatling/charts/assets/js/highstock.js rename to src/main/resources/io/gatling/charts/assets/js/highstock.js diff --git a/gatling-charts-highcharts/src/main/resources/io/gatling/charts/assets/js/theme.js b/src/main/resources/io/gatling/charts/assets/js/theme.js similarity index 100% rename from gatling-charts-highcharts/src/main/resources/io/gatling/charts/assets/js/theme.js rename to src/main/resources/io/gatling/charts/assets/js/theme.js diff --git a/gatling-charts-highcharts/src/main/resources/io/gatling/charts/assets/js/unpack.js b/src/main/resources/io/gatling/charts/assets/js/unpack.js similarity index 100% rename from gatling-charts-highcharts/src/main/resources/io/gatling/charts/assets/js/unpack.js rename to src/main/resources/io/gatling/charts/assets/js/unpack.js diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/ActiveUsersComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/ActiveUsersComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/ActiveUsersComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/ActiveUsersComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/AllUsersComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/AllUsersComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/AllUsersComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/AllUsersComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/ComponentLibraryImpl.scala b/src/main/scala/io/gatling/charts/highcharts/component/ComponentLibraryImpl.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/ComponentLibraryImpl.scala rename to src/main/scala/io/gatling/charts/highcharts/component/ComponentLibraryImpl.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/DistributionComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/DistributionComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/DistributionComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/DistributionComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/HighchartsComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/HighchartsComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/HighchartsComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/HighchartsComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/PercentilesOverTimeComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/PercentilesOverTimeComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/PercentilesOverTimeComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/PercentilesOverTimeComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/RangesComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/RangesComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/RangesComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/RangesComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/RequestCountPolarComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/RequestCountPolarComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/RequestCountPolarComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/RequestCountPolarComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/RequestsComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/RequestsComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/RequestsComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/RequestsComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/ResponseTimeScatterComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/ResponseTimeScatterComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/ResponseTimeScatterComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/ResponseTimeScatterComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/ResponsesComponent.scala b/src/main/scala/io/gatling/charts/highcharts/component/ResponsesComponent.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/component/ResponsesComponent.scala rename to src/main/scala/io/gatling/charts/highcharts/component/ResponsesComponent.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/CountsPerSecSeries.scala b/src/main/scala/io/gatling/charts/highcharts/series/CountsPerSecSeries.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/CountsPerSecSeries.scala rename to src/main/scala/io/gatling/charts/highcharts/series/CountsPerSecSeries.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/NumberPerSecondSeries.scala b/src/main/scala/io/gatling/charts/highcharts/series/NumberPerSecondSeries.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/NumberPerSecondSeries.scala rename to src/main/scala/io/gatling/charts/highcharts/series/NumberPerSecondSeries.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/PercentilesSeries.scala b/src/main/scala/io/gatling/charts/highcharts/series/PercentilesSeries.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/PercentilesSeries.scala rename to src/main/scala/io/gatling/charts/highcharts/series/PercentilesSeries.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/PieSeries.scala b/src/main/scala/io/gatling/charts/highcharts/series/PieSeries.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/PieSeries.scala rename to src/main/scala/io/gatling/charts/highcharts/series/PieSeries.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/ScatterSeries.scala b/src/main/scala/io/gatling/charts/highcharts/series/ScatterSeries.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/ScatterSeries.scala rename to src/main/scala/io/gatling/charts/highcharts/series/ScatterSeries.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/StackedColumnSeries.scala b/src/main/scala/io/gatling/charts/highcharts/series/StackedColumnSeries.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/series/StackedColumnSeries.scala rename to src/main/scala/io/gatling/charts/highcharts/series/StackedColumnSeries.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/ActiveUsersTemplate.scala b/src/main/scala/io/gatling/charts/highcharts/template/ActiveUsersTemplate.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/ActiveUsersTemplate.scala rename to src/main/scala/io/gatling/charts/highcharts/template/ActiveUsersTemplate.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/CountsPerSecTemplate.scala b/src/main/scala/io/gatling/charts/highcharts/template/CountsPerSecTemplate.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/CountsPerSecTemplate.scala rename to src/main/scala/io/gatling/charts/highcharts/template/CountsPerSecTemplate.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/DistributionTemplate.scala b/src/main/scala/io/gatling/charts/highcharts/template/DistributionTemplate.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/DistributionTemplate.scala rename to src/main/scala/io/gatling/charts/highcharts/template/DistributionTemplate.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/PercentilesOverTimeTemplate.scala b/src/main/scala/io/gatling/charts/highcharts/template/PercentilesOverTimeTemplate.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/PercentilesOverTimeTemplate.scala rename to src/main/scala/io/gatling/charts/highcharts/template/PercentilesOverTimeTemplate.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/RangesTemplate.scala b/src/main/scala/io/gatling/charts/highcharts/template/RangesTemplate.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/RangesTemplate.scala rename to src/main/scala/io/gatling/charts/highcharts/template/RangesTemplate.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/RequestCountPolarTemplate.scala b/src/main/scala/io/gatling/charts/highcharts/template/RequestCountPolarTemplate.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/RequestCountPolarTemplate.scala rename to src/main/scala/io/gatling/charts/highcharts/template/RequestCountPolarTemplate.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/ResponseTimeScatterTemplate.scala b/src/main/scala/io/gatling/charts/highcharts/template/ResponseTimeScatterTemplate.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/ResponseTimeScatterTemplate.scala rename to src/main/scala/io/gatling/charts/highcharts/template/ResponseTimeScatterTemplate.scala diff --git a/gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/Template.scala b/src/main/scala/io/gatling/charts/highcharts/template/Template.scala similarity index 100% rename from gatling-charts-highcharts/src/main/scala/io/gatling/charts/highcharts/template/Template.scala rename to src/main/scala/io/gatling/charts/highcharts/template/Template.scala