Tang Cheng | 1d56584 | 2019-12-18 20:33:41 +0800 | [diff] [blame] | 1 | import java.text.SimpleDateFormat |
| 2 | |
Tang Cheng | 2273131 | 2019-07-12 11:19:30 +0800 | [diff] [blame] | 3 | plugins { |
| 4 | id 'java' |
Tang Cheng | 1d56584 | 2019-12-18 20:33:41 +0800 | [diff] [blame] | 5 | id 'org.springframework.boot' version '2.2.2.RELEASE' |
| 6 | id 'io.spring.dependency-management' version '1.0.8.RELEASE' |
Tang Cheng | 2273131 | 2019-07-12 11:19:30 +0800 | [diff] [blame] | 7 | id 'org.jetbrains.kotlin.jvm' version '1.3.31' |
Tang Cheng | 1d56584 | 2019-12-18 20:33:41 +0800 | [diff] [blame] | 8 | id 'org.jetbrains.kotlin.plugin.spring' version '1.3.31' apply false |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 9 | id 'org.jetbrains.kotlin.plugin.jpa' version '1.3.31' apply false |
Tang Cheng | 8105edf | 2020-01-15 16:58:08 +0800 | [diff] [blame] | 10 | id "com.palantir.git-version" version "0.12.2" |
| 11 | id 'com.palantir.docker' version '0.22.2' apply false |
Tang Cheng | 2273131 | 2019-07-12 11:19:30 +0800 | [diff] [blame] | 12 | } |
| 13 | |
Tang Cheng | 1d56584 | 2019-12-18 20:33:41 +0800 | [diff] [blame] | 14 | bootJar { |
| 15 | enabled = false |
| 16 | } |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 17 | |
Tang Cheng | 9eb1bea | 2019-07-08 09:15:47 +0800 | [diff] [blame] | 18 | allprojects { |
| 19 | repositories { |
| 20 | jcenter() |
| 21 | mavenCentral() |
| 22 | } |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 23 | ext { |
| 24 | set('junit_jupiter_version', "5.5.2") |
| 25 | set("junit_platform_version", "1.5.2") |
| 26 | set("mockitoVersion", "3.1.0") |
Tang Cheng | 1d56584 | 2019-12-18 20:33:41 +0800 | [diff] [blame] | 27 | set("dockerRegistry", "harbor.supwisdom.com/dali") |
| 28 | set("buildTime", new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(new Date())) |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 29 | } |
Tang Cheng | 31a5b2a | 2019-11-25 22:01:48 +0800 | [diff] [blame] | 30 | |
Tang Cheng | 31a5b2a | 2019-11-25 22:01:48 +0800 | [diff] [blame] | 31 | apply plugin: 'java' |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 32 | apply plugin: 'io.spring.dependency-management' |
| 33 | |
Tang Cheng | 4c0ea6a | 2019-12-18 12:26:50 +0800 | [diff] [blame] | 34 | group = 'com.supwisdom' |
Tang Cheng | db7c2b5 | 2019-12-18 12:29:26 +0800 | [diff] [blame] | 35 | |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 36 | sourceCompatibility = JavaVersion.VERSION_1_8 |
| 37 | targetCompatibility = JavaVersion.VERSION_1_8 |
| 38 | |
| 39 | compileKotlin { |
| 40 | kotlinOptions { |
| 41 | freeCompilerArgs = ['-Xjsr305=strict'] |
| 42 | jvmTarget = jdkVersion |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | compileTestKotlin { |
| 47 | kotlinOptions { |
| 48 | freeCompilerArgs = ['-Xjsr305=strict'] |
| 49 | jvmTarget = jdkVersion |
| 50 | } |
| 51 | } |
| 52 | |
Tang Cheng | 1d56584 | 2019-12-18 20:33:41 +0800 | [diff] [blame] | 53 | sourceSets { |
| 54 | main.java.srcDirs += "src/main/java" |
| 55 | } |
| 56 | |
Tang Cheng | 7b01546 | 2019-12-17 14:08:26 +0800 | [diff] [blame] | 57 | version = '1' |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 58 | ext { |
| 59 | details = versionDetails() |
Tang Cheng | 7b01546 | 2019-12-17 14:08:26 +0800 | [diff] [blame] | 60 | buildVersion = gitVersion() |
Tang Cheng | 31a5b2a | 2019-11-25 22:01:48 +0800 | [diff] [blame] | 61 | } |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 62 | } |
Tang Cheng | 40993e1 | 2019-07-08 16:38:51 +0800 | [diff] [blame] | 63 | |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 64 | |
| 65 | subprojects { |
| 66 | |
| 67 | ext { |
| 68 | set('springCloudVersion', "Hoxton.RELEASE") |
| 69 | } |
| 70 | |
| 71 | dependencies { |
| 72 | ext { |
| 73 | slf4jVersion = '1.7.26' |
| 74 | beanutilsVersion = '1.9.3' |
| 75 | codecVersion = '1.13' |
| 76 | lang3Version = '3.9' |
| 77 | commonCodecVersion = '1.12' |
| 78 | lombokVersion = '1.18.8' |
| 79 | javaELVersion = '3.0.0' |
Tang Cheng | 7b61058 | 2020-02-18 21:28:33 +0800 | [diff] [blame^] | 80 | shedlockVersion = '4.3.0' |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 81 | jose4jVersion = '0.6.5' |
| 82 | jcabiManifestsVersion = '1.1' |
| 83 | kotlnLogVersion = '1.6.26' |
| 84 | slf4jVersion = '1.7.26' |
| 85 | gsonVersion = '2.8.5' |
| 86 | dbcpVersion = '1.4' |
| 87 | log4jVersion = '1.2.17' |
| 88 | alibabFastjsonVerison = '1.2.60' |
| 89 | beanutilsVersion = '1.9.3' |
| 90 | alipaySDKVersion = '3.7.110.ALL' |
| 91 | lombokVersion = '1.18.8' |
| 92 | resetAssuredVersion = '3.3.0' |
| 93 | hamcrestVersion = '2.1' |
| 94 | mockkVersion = '1.9.3' |
| 95 | commonNetVersion = '3.6' |
| 96 | kaptchaVersion = '2.3.2' |
| 97 | jerseyClientVersion = '1.19' |
| 98 | javaxWSRSVersion = '2.1.1' |
| 99 | dom4jVersion = '2.1.1' |
Tang Cheng | 9e4d0e3 | 2019-12-20 23:32:52 +0800 | [diff] [blame] | 100 | javaxServletVersion = '4.0.1' |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 101 | springSocialVersion = '1.1.6.RELEASE' |
| 102 | springKafkaVersion = '2.2.8.RELEASE' |
| 103 | postgresVersion = '42.2.5' |
Tang Cheng | 7b61058 | 2020-02-18 21:28:33 +0800 | [diff] [blame^] | 104 | multiTenantLibVersion = '1.3.2' |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 105 | } |
| 106 | implementation "org.jetbrains.kotlin:kotlin-reflect" |
| 107 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" |
| 108 | |
Tang Cheng | 1d56584 | 2019-12-18 20:33:41 +0800 | [diff] [blame] | 109 | implementation "org.springframework.boot:spring-boot-starter" |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 110 | implementation "org.springframework.boot:spring-boot-starter-data-jpa" |
| 111 | implementation "org.springframework.boot:spring-boot-starter-data-redis" |
| 112 | implementation "org.springframework.boot:spring-boot-starter-validation" |
| 113 | |
| 114 | implementation "javax.validation:validation-api" |
| 115 | implementation "com.jcabi:jcabi-manifests:${jcabiManifestsVersion}" |
| 116 | implementation "org.slf4j:slf4j-parent:${slf4jVersion}" |
| 117 | implementation "org.slf4j:slf4j-api:${slf4jVersion}" |
| 118 | implementation "org.postgresql:postgresql:${postgresVersion}" |
| 119 | implementation "io.github.microutils:kotlin-logging:${kotlnLogVersion}" |
| 120 | implementation "org.slf4j:slf4j-parent:${slf4jVersion}" |
| 121 | implementation "com.google.code.gson:gson:${gsonVersion}" |
| 122 | implementation "commons-dbcp:commons-dbcp:${dbcpVersion}" |
| 123 | implementation "commons-codec:commons-codec:${commonCodecVersion}" |
| 124 | implementation "log4j:log4j:${log4jVersion}" |
| 125 | implementation "com.alibaba:fastjson:${alibabFastjsonVerison}" |
| 126 | implementation "com.fasterxml.jackson.module:jackson-module-kotlin" |
| 127 | |
| 128 | |
| 129 | annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" |
| 130 | annotationProcessor "org.projectlombok:lombok:${lombokVersion}" |
| 131 | compileOnly "org.projectlombok:lombok:${lombokVersion}" |
| 132 | |
Tang Cheng | 9e4d0e3 | 2019-12-20 23:32:52 +0800 | [diff] [blame] | 133 | |
| 134 | testImplementation("org.springframework.boot:spring-boot-starter-test") { |
| 135 | exclude group: "junit", module: "junit" |
| 136 | } |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 137 | testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" |
| 138 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" |
| 139 | testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" |
Tang Cheng | 9e4d0e3 | 2019-12-20 23:32:52 +0800 | [diff] [blame] | 140 | testRuntimeOnly("org.junit.vintage:junit-vintage-engine:${junit_jupiter_version}") |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 141 | testImplementation "io.mockk:mockk:${mockkVersion}" |
| 142 | testImplementation "org.hamcrest:hamcrest:${hamcrestVersion}" |
| 143 | testImplementation "io.rest-assured:rest-assured:${resetAssuredVersion}" |
| 144 | testImplementation "io.rest-assured:spring-mock-mvc:${resetAssuredVersion}" |
| 145 | } |
| 146 | |
| 147 | test { |
| 148 | useJUnitPlatform() |
| 149 | testLogging { |
| 150 | events "passed", "skipped", "failed" |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | dependencyManagement { |
| 155 | imports { |
| 156 | mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" |
| 157 | } |
| 158 | } |
Tang Cheng | 8beabcd | 2019-07-12 11:48:01 +0800 | [diff] [blame] | 159 | } |
| 160 | |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 161 | |