Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit d85d12b

Browse files
authored
Merge pull request #103 from codeoverflow-org/feature/21-plugin-dev-env
Add deployment for plugin developers
2 parents 61f0665 + f3c6bb4 commit d85d12b

25 files changed

+409
-75
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ project/plugins/project/
3333
/bin/
3434
/lib/
3535
/deploy/
36+
/deployDev/
3637
/wiki/
3738

3839
# Plugin Data

.idea/runConfigurations/Deploy_dev__sbt_deployDev_.xml

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/_DeployDev__Generate_Bootstrap_Launcher_and_deploy_plugin_dev_environment.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ simple_run:
1515

1616
bootstrap_deploy:
1717
sbt clean
18-
sbt compile
1918
sbt gui
2019
sbt package copy
2120
sbt bs "project bootstrapProject" assembly
2221
sbt deploy
2322

23+
bootstrap_deploy_dev:
24+
sbt clean
25+
sbt gui
26+
sbt package copy
27+
sbt deployDev
28+
2429
create:
2530
sbt create
2631
sbt fetch
@@ -29,6 +34,9 @@ create:
2934
deploy:
3035
sbt deploy
3136

37+
deploy_dev:
38+
sbt deployDev
39+
3240
fetch:
3341
sbt fetch
3442

build.sbt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ libraryDependencies += "net.dv8tion" % "JDA" % "3.8.3_463"
6565
libraryDependencies += "com.fazecast" % "jSerialComm" % "[2.0.0,3.0.0)"
6666

6767
// Socket.io
68-
libraryDependencies += "io.socket" % "socket.io-client"% "1.0.0"
68+
libraryDependencies += "io.socket" % "socket.io-client" % "1.0.0"
6969
// ---------------------------------------------------------------------------------------------------------------------
7070
// PLUGIN FRAMEWORK DEFINITIONS
7171
// ---------------------------------------------------------------------------------------------------------------------
@@ -83,6 +83,7 @@ lazy val fetch = TaskKey[Unit]("fetch", "Searches for plugins in plugin director
8383
lazy val copy = TaskKey[Unit]("copy", "Copies all packaged plugin jars to the target plugin folder.")
8484
lazy val bs = TaskKey[Unit]("bs", "Updates the bootstrap project with current dependencies and chat overflow jars.")
8585
lazy val deploy = TaskKey[Unit]("deploy", "Prepares the environment for deployment, fills deploy folder.")
86+
lazy val deployDev = TaskKey[Unit]("deployDev", "Prepares the environment for plugin developers, fills deployDev folder.")
8687
lazy val gui = TaskKey[Unit]("gui", "Installs GUI dependencies and builds it using npm.")
8788

8889
pluginBuildFileName := "plugins.sbt"
@@ -97,6 +98,7 @@ fetch := BuildUtility(streams.value.log).fetchPluginsTask(pluginFolderNames.valu
9798
copy := BuildUtility(streams.value.log).copyPluginsTask(pluginFolderNames.value, pluginTargetFolderNames.value, scalaMajorVersion)
9899
bs := BootstrapUtility.bootstrapGenTask(streams.value.log, s"$scalaMajorVersion$scalaMinorVersion", getDependencyList.value)
99100
deploy := BootstrapUtility.prepareDeploymentTask(streams.value.log, scalaMajorVersion)
101+
deployDev := BootstrapUtility.prepareDevDeploymentTask(streams.value.log, scalaMajorVersion, apiProjectPath.value, libraryDependencies.value.toList)
100102
gui := BuildUtility(streams.value.log).guiTask(guiProjectPath.value, streams.value.cacheDirectory / "gui")
101103

102104
Compile / packageBin := {
@@ -111,6 +113,7 @@ Compile / unmanagedJars := (crossTarget.value ** "chatoverflow-gui*.jar").classp
111113
// ---------------------------------------------------------------------------------------------------------------------
112114

113115
// Util task for bs, gets a dependency list kinda like "sbt dependencyList", but only includes deps required for runtime
116+
// Filters out all chatoverflow modules, because those are not actual dependencies.
114117
lazy val getDependencyList = Def.task[List[ModuleID]] {
115118
// only get deps required for runtime and not for anything else like testing
116119
val updateReport = update.value.configuration(ConfigRef("runtime"))
@@ -119,6 +122,8 @@ lazy val getDependencyList = Def.task[List[ModuleID]] {
119122
List()
120123
} else {
121124
updateReport.get.modules.map(m => m.module).toList
125+
.filterNot(m => m.name == s"chatoverflow-api_$scalaMajorVersion" ||
126+
m.name == s"chatoverflow_$scalaMajorVersion")
122127
}
123128
}
124129

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)