1
1
// This is a stripped down version of the build.sbt found in the main framework.
2
- // Its almost like the one from the framework but without some sbt tasks like 'deploy' that aren't needed for plugin developers
3
- // and without dependencies, because those get their own generated file.
4
-
5
- // ---------------------------------------------------------------------------------------------------------------------
6
- // PROJECT INFORMATION
7
- // ---------------------------------------------------------------------------------------------------------------------
2
+ // Its almost like the one from the framework but without some sbt tasks like 'deploy' that aren't needed for plugin developers.
8
3
4
+ // Main project config
9
5
name := " ChatOverflow"
10
6
version := " 3.0.0"
11
7
12
- // This task has to be overwritten, because sbt will only look in source files for main classes, but the class is in a jar.
13
- Compile / discoveredMainClasses := Seq (" org.codeoverflow.chatoverflow.Launcher" )
14
-
15
- // One version for all sub projects. Use "retrieveManaged := true" to download and show all library dependencies.
16
- val scalaMajorVersion = " 2.12"
17
- val scalaMinorVersion = " .5"
18
- inThisBuild(List (
19
- scalaVersion := s " $scalaMajorVersion$scalaMinorVersion" ,
20
- retrieveManaged := false )
21
- )
22
-
23
- unmanagedBase := file(" bin" )
24
-
25
- // ---------------------------------------------------------------------------------------------------------------------
26
- // PLUGIN FRAMEWORK DEFINITIONS
27
- // ---------------------------------------------------------------------------------------------------------------------
28
-
29
- // Plugin framework settings
30
- lazy val pluginBuildFileName = settingKey[String ](" The filename of the plugin build file. Remember to gitignore it!" )
31
- lazy val pluginFolderNames = settingKey[List [String ]](" The folder names of all plugin source directories." )
32
- lazy val pluginTargetFolderNames = settingKey[List [String ]](" The folder names of compiled and packaged plugins. Remember to gitignore these!" )
33
- lazy val apiProjectPath = settingKey[String ](" The path to the api sub project. Remember to gitignore it!" )
34
-
35
- // Plugin framework tasks
36
- lazy val create = TaskKey [Unit ](" create" , " Creates a new plugin. Interactive command using the console." )
37
- lazy val fetch = TaskKey [Unit ](" fetch" , " Searches for plugins in plugin directories, builds the plugin build file." )
38
- lazy val copy = TaskKey [Unit ](" copy" , " Copies all packaged plugin jars to the target plugin folder." )
39
-
40
- pluginBuildFileName := " plugins.sbt"
41
- pluginFolderNames := List (" plugins-public" , " plugins-private" )
42
- pluginTargetFolderNames := List (" plugins" , s " target/scala- $scalaMajorVersion/plugins " )
43
- apiProjectPath := " api"
44
-
45
-
46
- import org .codeoverflow .chatoverflow .build .plugins .{PluginCreateWizard , PluginUtility }
8
+ // Main class and sub projects
9
+ mainClass := Some (" org.codeoverflow.chatoverflow.Launcher" )
47
10
48
- create := new PluginCreateWizard (streams.value.log).createPluginTask(pluginFolderNames.value, PluginCreateWizard .getApiVersion.value)
49
- fetch := new PluginUtility (streams.value.log).fetchPluginsTask(pluginFolderNames.value, pluginBuildFileName.value,
50
- pluginTargetFolderNames.value, apiProjectPath.value)
51
- copy := new PluginUtility (streams.value.log).copyPluginsTask(pluginFolderNames.value, pluginTargetFolderNames.value, scalaMajorVersion)
11
+ // Settings
12
+ inThisBuild(List (scalaVersion := " 2.12.5" ))
52
13
53
- packageBin / includePom := false
54
14
fork in run := true // Start ChatOverflow in it's own java process when starting it with 'sbt run'
0 commit comments