mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-10-31 22:45:06 +01:00
add fatJar
This commit is contained in:
parent
a7e63565ef
commit
ace471abdb
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,3 +4,5 @@
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
||||
server/src/main/resources/react
|
||||
|
@ -1,6 +1,9 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
plugins {
|
||||
// id("org.jetbrains.kotlin.jvm") version "1.4.21"
|
||||
application
|
||||
id("com.github.johnrengelman.shadow") version "6.1.0"
|
||||
}
|
||||
|
||||
|
||||
@ -84,5 +87,43 @@ dependencies {
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass.set("ir.armor.tachidesk.Main")
|
||||
val name = "ir.armor.tachidesk.Main"
|
||||
mainClass.set(name)
|
||||
|
||||
// Required by ShadowJar.
|
||||
mainClassName = name
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
resources {
|
||||
srcDir("src/main/resources")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
mapOf(
|
||||
"Main-Class" to "com.example.MainKt", //will make your jar (produced by jar task) runnable
|
||||
"ImplementationTitle" to project.name,
|
||||
"Implementation-Version" to project.version)
|
||||
)
|
||||
}
|
||||
}
|
||||
shadowJar {
|
||||
manifest.inheritFrom(jar.get().manifest) //will make your shadowJar (produced by jar task) runnable
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<ShadowJar> {
|
||||
destinationDir = File("$rootDir/server/build")
|
||||
//dependsOn(":webUI:copyBuild")
|
||||
}
|
||||
|
||||
tasks.named("processResources") {
|
||||
dependsOn(":webUI:copyBuild")
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,12 @@ class Main {
|
||||
|
||||
|
||||
|
||||
val app = Javalin.create().start(4567)
|
||||
val app = Javalin.create { config ->
|
||||
// config.addSinglePageRoot("/", "")
|
||||
config.addStaticFiles("/react")
|
||||
}.start(4567)
|
||||
|
||||
|
||||
|
||||
app.before() { ctx ->
|
||||
// allow the client which is running on another port
|
||||
|
@ -5,4 +5,17 @@ plugins {
|
||||
node {
|
||||
workDir = file("${project.projectDir}/react/")
|
||||
nodeModulesDir = file("${project.projectDir}/react/node_modules")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("yarn_build") {
|
||||
dependsOn("yarn_install")
|
||||
}
|
||||
|
||||
tasks.register<Copy>("copyBuild") {
|
||||
from(file("$rootDir/webUI/react/build"))
|
||||
into(file("$rootDir/server/src/main/resources/react"))
|
||||
}
|
||||
|
||||
tasks.named("copyBuild") {
|
||||
dependsOn("yarn_build")
|
||||
}
|
||||
|
10
webUI/node_modules/.yarn-integrity
generated
vendored
Normal file
10
webUI/node_modules/.yarn-integrity
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"systemParams": "linux-x64-88",
|
||||
"modulesFolders": [],
|
||||
"flags": [],
|
||||
"linkedModules": [],
|
||||
"topLevelPatterns": [],
|
||||
"lockfileEntries": {},
|
||||
"files": [],
|
||||
"artifacts": {}
|
||||
}
|
4
webUI/yarn.lock
Normal file
4
webUI/yarn.lock
Normal file
@ -0,0 +1,4 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user