blob: 789c2d54395590822b959d196b3272967831e607 [file] [log] [blame]
Xia Kaixiang95e88482019-04-08 17:56:29 +08001plugins {
Tang Chenge4dd0882019-04-09 13:10:47 +08002 id 'org.springframework.boot'
3 id 'org.jetbrains.kotlin.jvm'
4 id 'org.jetbrains.kotlin.plugin.jpa'
5 id 'org.jetbrains.kotlin.plugin.spring'
Tang Cheng01be68b2019-07-03 11:07:32 +08006 id 'com.palantir.docker' version '0.22.1'
Xia Kaixiang95e88482019-04-08 17:56:29 +08007}
8
9apply plugin: 'io.spring.dependency-management'
Xia Kaixiang95e88482019-04-08 17:56:29 +080010group = 'com.supwisdom'
sijun.li408d8902019-06-10 16:00:24 +080011version = waterManagerVersion
Tang Chenge4dd0882019-04-09 13:10:47 +080012sourceCompatibility = jdkVersion
Xia Kaixiang95e88482019-04-08 17:56:29 +080013
Tang Chengc90c37f2019-07-08 11:12:18 +080014waterManagerVersion = gitVersion()
Xia Kaixiang95e88482019-04-08 17:56:29 +080015repositories {
16 mavenCentral()
17}
18
sijun.li675a8f82019-07-03 10:30:35 +080019def startClass = 'com.supwisdom.dlpay.WaterManagerApplicationKt'
20
Tang Chengc90c37f2019-07-08 11:12:18 +080021println("Build version: $waterManagerVersion")
sijun.li675a8f82019-07-03 10:30:35 +080022repositories {
23 mavenCentral()
Tang Cheng67cf6302019-04-16 11:16:12 +080024}
25
sijun.li675a8f82019-07-03 10:30:35 +080026bootJar {
sijun.li675a8f82019-07-03 10:30:35 +080027 mainClassName = startClass
Tang Chenga1949692019-07-05 10:25:36 +080028 manifest {
Tang Chengc90c37f2019-07-08 11:12:18 +080029 attributes('Water-Version': waterManagerVersion)
Tang Chenga1949692019-07-05 10:25:36 +080030 }
sijun.li675a8f82019-07-03 10:30:35 +080031}
32
33jar {
Tang Chenga1949692019-07-05 10:25:36 +080034 baseName = "watermanager"
sijun.li675a8f82019-07-03 10:30:35 +080035}
Tang Cheng01be68b2019-07-03 11:07:32 +080036
37docker {
Tang Cheng706b1212019-07-06 16:09:42 +080038 name 'harbor.supwisdom.com/dali/water:' + version
Tang Cheng01be68b2019-07-03 11:07:32 +080039 println(jar.archivePath)
40 files jar.archivePath
41}
42
Tang Chenga1949692019-07-05 10:25:36 +080043docker.dependsOn(jar)
44
Xia Kaixiang95e88482019-04-08 17:56:29 +080045dependencies {
sijun.li8ac8a0b2019-07-02 17:08:38 +080046 compile(
47 'net.sf.json-lib:json-lib:2.4:jdk15'
48 )
Xia Kaixiang95e88482019-04-08 17:56:29 +080049 implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
Tang Cheng1475eb22019-04-16 22:59:02 +080050 implementation 'org.springframework.boot:spring-boot-starter-data-redis'
Xia Kaixiang95e88482019-04-08 17:56:29 +080051 implementation 'org.springframework.boot:spring-boot-starter-web'
Tang Cheng4939a452019-04-15 22:30:15 +080052 implementation 'org.springframework.boot:spring-boot-starter-security'
sijun.li472e3322019-07-03 15:18:09 +080053// implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.0.1.RELEASE'
54 implementation 'org.springframework.boot:spring-boot-autoconfigure'
Tang Chengcb61aed2019-05-24 20:34:07 +080055// implementation 'org.springframework.security.oauth:spring-security-oauth2'
Xia Kaixiang2d3a1ce2019-04-16 17:58:56 +080056 implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
Tang Chengec8a86b2019-05-13 21:17:08 +080057 implementation 'org.springframework.session:spring-session-data-redis'
Tang Cheng69566792019-05-28 10:16:40 +080058 implementation 'org.springframework.boot:spring-boot-starter-cache'
Tang Chengec8a86b2019-05-13 21:17:08 +080059 implementation 'org.springframework.social:spring-social-web:1.1.6.RELEASE'
Xia Kaixiang95e88482019-04-08 17:56:29 +080060 implementation 'org.jetbrains.kotlin:kotlin-reflect'
61 implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
Xia Kaixiang95e88482019-04-08 17:56:29 +080062
Tang Cheng5b4115e2019-06-28 22:33:52 +080063
Tang Chengec8a86b2019-05-13 21:17:08 +080064 implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
Tang Cheng67cf6302019-04-16 11:16:12 +080065 implementation 'org.postgresql:postgresql:42.2.5'
Tang Chengec8a86b2019-05-13 21:17:08 +080066 implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
Tang Cheng67cf6302019-04-16 11:16:12 +080067 implementation 'com.jcabi:jcabi-manifests:1.1'
Tang Cheng1caa64e2019-04-16 11:27:14 +080068 implementation 'org.bitbucket.b_c:jose4j:0.6.3'
Tang Cheng66643252019-04-23 09:14:01 +080069 implementation 'io.github.microutils:kotlin-logging:1.6.26'
Tang Chengec8a86b2019-05-13 21:17:08 +080070 implementation 'org.slf4j:slf4j-parent:1.7.26'
Tang Cheng67cf6302019-04-16 11:16:12 +080071 implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
72 implementation group: 'com.sun.jersey', name: 'jersey-client', version: '1.19'
Tang Cheng0ef385d2019-04-14 14:08:44 +080073 implementation group: 'javax.servlet', name: 'jstl', version: '1.2'
74 implementation group: 'taglibs', name: 'standard', version: '1.1.2'
Xia Kaixiang72373d82019-04-18 13:52:36 +080075 implementation group: 'commons-codec', name: 'commons-codec', version: '1.6'
Tang Cheng67cf6302019-04-16 11:16:12 +080076 implementation files('libs/ojdbc6.jar')
qiaowei1026aa12019-04-09 16:32:03 +080077
Tang Cheng67cf6302019-04-16 11:16:12 +080078
Tang Cheng1475eb22019-04-16 22:59:02 +080079 annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
80
sijun.li675a8f82019-07-03 10:30:35 +080081// providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
Tang Cheng67cf6302019-04-16 11:16:12 +080082 testImplementation 'org.springframework.boot:spring-boot-starter-test'
Tang Cheng173e3b42019-04-24 11:55:35 +080083 testImplementation 'io.rest-assured:rest-assured:3.3.0'
84 testImplementation 'io.rest-assured:spring-mock-mvc:3.3.0'
85 testImplementation 'org.hamcrest:hamcrest:2.1'
Xia Kaixiang95e88482019-04-08 17:56:29 +080086}
87
88compileKotlin {
89 kotlinOptions {
90 freeCompilerArgs = ['-Xjsr305=strict']
Tang Chenge4dd0882019-04-09 13:10:47 +080091 jvmTarget = jdkVersion
Xia Kaixiang95e88482019-04-08 17:56:29 +080092 }
93}
94
95compileTestKotlin {
96 kotlinOptions {
97 freeCompilerArgs = ['-Xjsr305=strict']
Tang Chenge4dd0882019-04-09 13:10:47 +080098 jvmTarget = jdkVersion
Xia Kaixiang95e88482019-04-08 17:56:29 +080099 }
100}