mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 17:18:52 -06:00
Reorganize top level directory
This commit is contained in:
88
uhabits-server/build.gradle
Normal file
88
uhabits-server/build.gradle
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (C) 2016-2020 Alinson Santos Xavier <git@axavier.org>
|
||||
*
|
||||
* This file is part of Loop Habit Tracker.
|
||||
*
|
||||
* Loop Habit Tracker is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* Loop Habit Tracker is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "com.github.jengelman.gradle.plugins:shadow:5.2.0"
|
||||
classpath "com.palantir.gradle.docker:gradle-docker:0.25.0"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: "com.github.johnrengelman.shadow"
|
||||
apply plugin: 'application'
|
||||
apply plugin: "com.palantir.docker"
|
||||
apply plugin: "com.palantir.docker-run"
|
||||
|
||||
group 'org.isoron.uhabits'
|
||||
version '0.0.1'
|
||||
mainClassName = "io.ktor.server.netty.EngineMain"
|
||||
|
||||
sourceSets {
|
||||
main.kotlin.srcDirs = main.java.srcDirs = ['src']
|
||||
test.kotlin.srcDirs = test.java.srcDirs = ['test']
|
||||
main.resources.srcDirs = ['resources']
|
||||
test.resources.srcDirs = ['testresources']
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
maven { url 'https://kotlin.bintray.com/ktor' }
|
||||
maven { url 'https://kotlin.bintray.com/kotlin-js-wrappers' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "io.ktor:ktor-server-netty:$ktor_version"
|
||||
implementation "ch.qos.logback:logback-classic:$logback_version"
|
||||
implementation "io.ktor:ktor-server-core:$ktor_version"
|
||||
implementation "io.ktor:ktor-html-builder:$ktor_version"
|
||||
implementation "io.ktor:ktor-jackson:$ktor_version"
|
||||
implementation "org.jetbrains:kotlin-css-jvm:1.0.0-pre.31-kotlin-1.2.41"
|
||||
implementation "io.prometheus:simpleclient:0.9.0"
|
||||
implementation "io.prometheus:simpleclient_httpserver:0.9.0"
|
||||
implementation "io.prometheus:simpleclient_hotspot:0.9.0"
|
||||
testImplementation "io.ktor:ktor-server-tests:$ktor_version"
|
||||
testImplementation "org.mockito:mockito-core:2.+"
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
baseName = 'uhabits-server'
|
||||
classifier = null
|
||||
version = null
|
||||
}
|
||||
|
||||
docker {
|
||||
name = "docker.axavier.org/uhabits-server:$version"
|
||||
files "build/libs/uhabits-server.jar"
|
||||
}
|
||||
|
||||
dockerRun {
|
||||
name = 'uhabits-server'
|
||||
image "uhabits-server:$version"
|
||||
ports '8080:8080'
|
||||
daemonize false
|
||||
clean true
|
||||
}
|
||||
Reference in New Issue
Block a user