Skip to content

Commit

Permalink
Add separate :webscrambles configuration for backend-only
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Billing committed Sep 8, 2020
1 parent e68380f commit 94d73f3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ tasks.create("runDebug") {
dependsOn(":$releaseProject:runShadow")
}

tasks.create("runBackend") {
description = "Run an unofficial JAR that only holds the backend and nothing else. Visiting the localhost website WILL NOT WORK"
group = "Development"

dependsOn(":$releaseProject:run")
}

tasks.create("installCloud") {
dependsOn("registerCloudReleaseTag", ":cloudscrambles:appengineDeploy")
}
Expand Down
15 changes: 14 additions & 1 deletion webscrambles/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ plugins {
KOTLIN_SERIALIZATION
}

configurations {
create("deployable") {
extendsFrom(configurations["default"])
}
}

dependencies {
implementation(project(":tnoodle-server"))

Expand All @@ -57,7 +63,8 @@ dependencies {
implementation(KTOR_WEBSOCKETS)

runtimeOnly(BOUNCYCASTLE)
runtimeOnly(project(":tnoodle-ui"))

"deployable"(project(":tnoodle-ui"))

testImplementation(TESTING_MOCKK)
}
Expand Down Expand Up @@ -106,6 +113,8 @@ tasks.create("registerManifest") {
}

tasks.getByName<ShadowJar>("shadowJar") {
configurations = listOf(project.configurations["deployable"])

val targetLn = rootProject.file(TNOODLE_SYMLINK)
outputs.file(targetLn)

Expand All @@ -118,3 +127,7 @@ tasks.getByName<ShadowJar>("shadowJar") {
}
}
}

tasks.getByName<JavaExec>("run") {
args = listOf("--nobrowser")
}

0 comments on commit 94d73f3

Please sign in to comment.