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

Commit 85f3e1e

Browse files
committed
Finished dependency sbt code. Next up: Bootstrap launcher logic.
1 parent 84f9123 commit 85f3e1e

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ project/plugins/project/
2424
# Plugin Framework
2525
/plugins/
2626
/plugins.sbt
27-
/config/
27+
/config/
28+
29+
# resources of the bootstrap project (everything is generated with sbt bs)
30+
/bootstrap/src/main/resources/

bootstrap/src/main/scala/Bootstrap.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ object Bootstrap {
88
TODO:
99
1. Write SBT-Logic to extract all libs from "sbt dependencyList" DONE
1010
2. Write SBT-logic to transform and save this information as URL List DONE
11-
2a. Make the logik copy the built jars into an bin folder inside the resources of the bootstrap
1211
3. Make the boostrap launcher download everything, create folder structures
1312
and launch chat overflow with custom classpath
14-
4. Make fat jar with only the scala lib inside (and the chat overflow files?)
13+
4. Make fat jar with only the scala lib inside
1514
*/
1615

1716
}

project/BootstrapUtility.scala

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ class Dependency(dependencyString: String, logger: ManagedLogger) {
8282

8383
object BootstrapUtility {
8484
val dependencyListFileName = "dependencyList.txt"
85-
val dependencyXMLFileName = "bootstrap/src/main/resources/dependencies.xml"
85+
val dependencyProjectBasePath = "bootstrap/src/main"
86+
val dependencyXMLFileName = s"$dependencyProjectBasePath/resources/dependencies.xml"
87+
val dependencyBinFolder = s"$dependencyProjectBasePath/resources/bin/"
8688

8789
def bootstrapGenTask(logger: ManagedLogger, scalaLibraryVersion: String): Unit = {
8890
println("Welcome to the bootstrap generation utility. It's time to build!")
@@ -91,8 +93,7 @@ object BootstrapUtility {
9193
val dependencyList = retrieveDependencies(logger, scalaLibraryVersion)
9294
saveDependencyXML(dependencyList, logger)
9395

94-
// Copy built jar files
95-
copyJars(logger)
96+
println("Finished bootstrap generation utility. Have a nice day!")
9697
}
9798

9899
private def saveDependencyXML(dependencyList: List[Dependency], logger: ManagedLogger): Unit = {
@@ -109,9 +110,6 @@ object BootstrapUtility {
109110
logger info "Finished saving XML file."
110111
}
111112

112-
private def copyJars(logger: ManagedLogger): Unit = {
113-
}
114-
115113
private def retrieveDependencies(logger: ManagedLogger, scalaLibraryVersion: String): List[Dependency] = {
116114

117115
logger info "Starting dependency retrieval."
@@ -152,4 +150,14 @@ object BootstrapUtility {
152150
}
153151
}
154152

155-
}
153+
}
154+
155+
// TODO: Create automated packaging code. Done by hand right now.
156+
157+
/* Ensure the following bootstrap folder structure (e.g. in bootstrap/target/...)
158+
/launcher.jar GENERATED BY SBT
159+
/bin/chatoverflow... .jar COPY BY HAND
160+
/bin/chatoverflow-api... .jar COPY BY HAND
161+
/lib/... GENERATED AT RUNTIME
162+
LICENSE.txt COPY BY HAND
163+
*/

0 commit comments

Comments
 (0)