mirror of
https://github.com/dyrkin/luxmed-bot.git
synced 2026-01-01 02:27:24 +01:00
57 lines
1.5 KiB
Groovy
57 lines
1.5 KiB
Groovy
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
buildscript {
|
|
ext {
|
|
springBootVersion = '2.0.2.RELEASE'
|
|
}
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
|
|
}
|
|
}
|
|
|
|
apply plugin: 'java'
|
|
apply plugin: 'scala'
|
|
apply plugin: 'org.springframework.boot'
|
|
apply plugin: 'io.spring.dependency-management'
|
|
|
|
dependencies {
|
|
compile project(':api')
|
|
compile project(':bot')
|
|
compile project(':common')
|
|
|
|
compile('com.lihaoyi:sourcecode_2.12:0.1.4')
|
|
|
|
compile('org.springframework.boot:spring-boot-starter')
|
|
compile('org.springframework.boot:spring-boot-starter-data-jpa')
|
|
|
|
compile('org.jasypt:jasypt:1.9.2')
|
|
compile('org.postgresql:postgresql:42.2.1.jre7')
|
|
|
|
testCompile('com.typesafe.akka:akka-testkit_2.12:2.4.19')
|
|
}
|
|
|
|
task replaceTokens(type: Copy) {
|
|
def finalBuildName = project.name + '-' + project.version
|
|
|
|
from 'src/main/docker'
|
|
into 'build/docker'
|
|
filter(ReplaceTokens, tokens:
|
|
['project.build.finalName': finalBuildName,
|
|
"TELEGRAM_TOKEN" : System.getenv()['TELEGRAM_TOKEN'],
|
|
"SECURITY_SECRET" : System.getenv()['SECURITY_SECRET']
|
|
])
|
|
}
|
|
|
|
task copyJar(type: Copy) {
|
|
dependsOn assemble
|
|
from file("${project.buildDir}/libs")
|
|
into file("${project.buildDir}/docker")
|
|
}
|
|
|
|
task makeDockerFile(type: Copy, dependsOn: [replaceTokens, copyJar])
|
|
|