mirror of
https://github.com/dyrkin/luxmed-bot.git
synced 2025-12-21 13:23:05 +01:00
Update Gradle build-tool (#37)
This commit is contained in:
committed by
GitHub
parent
929240a494
commit
1b254f8ed5
1
.gitignore
vendored
1
.gitignore
vendored
@@ -87,6 +87,7 @@ cmake-build-release/
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
build/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
@@ -29,5 +29,11 @@ to the same folder and rename it to **secrets.env**
|
||||
```
|
||||
11. Send `/start` command to your bot
|
||||
|
||||
### Develop run
|
||||
|
||||
1. Run `docker-compose up` to launch PostgreSQL database
|
||||
2. Set env `TELEGRAM_TOKEN="YOUR_TOKEN"`
|
||||
3. Run `Boot.scala` app
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
dependencies {
|
||||
compile project(':common')
|
||||
implementation project(':common')
|
||||
|
||||
compile group: "org.scalaj", name: "scalaj-http_2.12", version: "2.4.2"
|
||||
compile group: "org.json4s", name: "json4s-jackson_2.12", version: "3.6.0-M3"
|
||||
compile group: "com.softwaremill.quicklens", name: "quicklens_2.12", version: "1.4.12"
|
||||
api "org.scalaj:scalaj-http_$scala:2.4.2"
|
||||
api "org.json4s:json4s-jackson_$scala:3.6.0-M3"
|
||||
api "com.softwaremill.quicklens:quicklens_$scala:1.4.12"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
dependencies {
|
||||
compile project(':common')
|
||||
implementation project(':common')
|
||||
|
||||
compile group: "com.bot4s", name: "telegram-core_2.12", version: "5.6.0"
|
||||
compile group: "com.bot4s", name: "telegram-akka_2.12", version: "5.6.0"
|
||||
api "com.bot4s:telegram-akka_$scala:5.6.0"
|
||||
}
|
||||
47
build.gradle
47
build.gradle
@@ -1,49 +1,24 @@
|
||||
group = 'com.lbs'
|
||||
|
||||
ext {
|
||||
scalaVersion = "2.12.8"
|
||||
plugins {
|
||||
id "com.github.maiflai.scalatest" version "0.32"
|
||||
id "org.springframework.boot" version "2.7.2"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = 'com.lbs'
|
||||
}
|
||||
|
||||
apply plugin: 'idea'
|
||||
|
||||
subprojects {
|
||||
|
||||
idea {
|
||||
module {
|
||||
downloadSources = true
|
||||
}
|
||||
}
|
||||
apply plugin: "scala"
|
||||
apply plugin: "java-library"
|
||||
apply plugin: "com.github.maiflai.scalatest"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven { url 'https://repo.spring.io/libs-milestone' }
|
||||
maven { url "https://repo.spring.io/libs-milestone" }
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'scala'
|
||||
|
||||
dependencies {
|
||||
compile group: 'org.scala-lang', name: "scala-library", version: scalaVersion
|
||||
compileOnly "org.scala-lang:scala-library:$scala.$scala_minor"
|
||||
|
||||
testCompile('org.scalatest:scalatest_2.12:3.0.4')
|
||||
testCompile('org.mockito:mockito-core:2.13.0')
|
||||
testCompile('org.pegdown:pegdown:1.6.0')
|
||||
}
|
||||
testImplementation "org.scalatest:scalatest_$scala:3.0.4"
|
||||
|
||||
task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
|
||||
main = 'org.scalatest.tools.Runner'
|
||||
args = ['-R', "build/classes/scala/test",
|
||||
'-u', "build/test-results/$name",
|
||||
'-h', "build/resports/scalaTests/$name",
|
||||
'-o'
|
||||
]
|
||||
classpath = sourceSets.test.runtimeClasspath
|
||||
testImplementation "org.mockito:mockito-core:2.13.0"
|
||||
testImplementation "org.pegdown:pegdown:1.6.0"
|
||||
}
|
||||
|
||||
test.dependsOn scalaTest
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
dependencies {
|
||||
compile group: "org.slf4j", name: "slf4j-api", version: "1.7.25"
|
||||
compile group: "ch.qos.logback", name: "logback-classic", version: "1.2.3"
|
||||
compile group: "ch.qos.logback", name: "logback-core", version: "1.2.3"
|
||||
compile("org.typelevel:cats-core_2.12:2.0.0-M1")
|
||||
api "org.slf4j:slf4j-api:1.7.25"
|
||||
api "ch.qos.logback:logback-classic:1.2.3"
|
||||
api "org.typelevel:cats-core_$scala:2.0.0-M1"
|
||||
}
|
||||
|
||||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: '3.4'
|
||||
services:
|
||||
database:
|
||||
image: postgres:10.6
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
- POSTGRES_USER=lbs
|
||||
- POSTGRES_PASSWORD=lsb123
|
||||
- POSTGRES_DB=lbs
|
||||
- TZ=Europe/Warsaw
|
||||
@@ -2,3 +2,6 @@ org.gradle.daemon=true
|
||||
org.gradle.parallel=true
|
||||
org.gradle.configureondemand=true
|
||||
org.gradle.jvmargs=-Dfile.encoding=UTF-8
|
||||
|
||||
scala=2.12
|
||||
scala_minor=16
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
|
||||
@@ -1,39 +1,26 @@
|
||||
buildscript {
|
||||
ext {
|
||||
springBootVersion = '2.1.1.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'
|
||||
apply plugin: "org.springframework.boot"
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencies {
|
||||
compile project(':api')
|
||||
compile project(':bot')
|
||||
compile project(':common')
|
||||
implementation project(":api")
|
||||
implementation project(":bot")
|
||||
implementation project(":common")
|
||||
|
||||
compile('com.lihaoyi:sourcecode_2.12:0.1.4')
|
||||
implementation "com.lihaoyi:sourcecode_$scala:0.1.4"
|
||||
|
||||
compile('org.springframework.boot:spring-boot-starter')
|
||||
compile('org.springframework.boot:spring-boot-starter-data-jpa')
|
||||
compile('org.liquibase:liquibase-core')
|
||||
implementation "org.springframework.boot:spring-boot-starter"
|
||||
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
|
||||
implementation "org.liquibase:liquibase-core"
|
||||
|
||||
compile('org.jasypt:jasypt:1.9.2')
|
||||
compile('org.postgresql:postgresql:42.2.1.jre7')
|
||||
implementation "org.jasypt:jasypt:1.9.2"
|
||||
implementation "org.postgresql:postgresql:42.2.26"
|
||||
|
||||
testImplementation('com.typesafe.akka:akka-testkit_2.12:2.6.19')
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test')
|
||||
testImplementation('com.h2database:h2')
|
||||
runtime group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: "1.4.10"
|
||||
testImplementation "com.typesafe.akka:akka-testkit_$scala:2.6.19"
|
||||
testImplementation "org.springframework.boot:spring-boot-starter-test"
|
||||
testImplementation "com.h2database:h2"
|
||||
|
||||
// fixme: remove junit
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
}
|
||||
|
||||
task prepare(type: Copy) {
|
||||
|
||||
@@ -13,6 +13,8 @@ spring:
|
||||
generate-ddl: "false"
|
||||
liquibase:
|
||||
change-log: classpath:db/liquibase-changelog.yml
|
||||
main:
|
||||
allow-circular-references: true
|
||||
|
||||
banner:
|
||||
location: "classpath:/banner.txt"
|
||||
|
||||
Reference in New Issue
Block a user