Xia Kaixiang | 80f1e9d | 2020-02-18 17:40:20 +0800 | [diff] [blame] | 1 | plugins { |
| 2 | id 'java' |
| 3 | id 'maven-publish' |
| 4 | id "com.palantir.git-version" |
kaixiang.xia | ee5d5d8 | 2020-07-08 14:57:37 +0800 | [diff] [blame] | 5 | id "org.springframework.boot" |
Xia Kaixiang | 80f1e9d | 2020-02-18 17:40:20 +0800 | [diff] [blame] | 6 | } |
| 7 | |
| 8 | group = rootProject.group |
| 9 | |
kaixiang.xia | 43a0bcc | 2021-02-01 11:10:11 +0800 | [diff] [blame] | 10 | def sdkVersion = '1.3.6' |
Xia Kaixiang | 80f1e9d | 2020-02-18 17:40:20 +0800 | [diff] [blame] | 11 | sourceCompatibility = 1.8 |
| 12 | targetCompatibility = 1.8 |
| 13 | |
| 14 | publishing { |
| 15 | publications { |
| 16 | mavenJava(MavenPublication) { |
| 17 | groupId = project.group |
kaixiang.xia | 03919bd | 2020-10-28 18:19:09 +0800 | [diff] [blame] | 18 | artifactId = 'dlsmk-qrcode' |
Xia Kaixiang | 80f1e9d | 2020-02-18 17:40:20 +0800 | [diff] [blame] | 19 | version = sdkVersion |
| 20 | from components.java |
| 21 | } |
| 22 | } |
| 23 | repositories { |
| 24 | maven { |
| 25 | // change URLs to point to your repos, e.g. http://my.org/repo |
| 26 | def releasesRepoUrl = "http://ykt-nx.supwisdom.com/repository/ecard-repo/" |
| 27 | def snapshotsRepoUrl = "http://ykt-nx.supwisdom.com/repository/ecard-repo/snapshot/" |
| 28 | url = version.endsWith('dirty') ? snapshotsRepoUrl : releasesRepoUrl |
| 29 | credentials(PasswordCredentials) { |
| 30 | username = nxUser |
| 31 | password = nxPassword |
| 32 | } |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | dependencies { |
| 38 | implementation "org.apache.commons:commons-lang3:3.7" |
kaixiang.xia | 427418f | 2020-11-05 14:57:08 +0800 | [diff] [blame] | 39 | implementation 'com.eatthepath:java-otp:0.2.0' |
kaixiang.xia | 03919bd | 2020-10-28 18:19:09 +0800 | [diff] [blame] | 40 | implementation 'org.slf4j:slf4j-api:1.7.26' |
Xia Kaixiang | 80f1e9d | 2020-02-18 17:40:20 +0800 | [diff] [blame] | 41 | implementation 'commons-codec:commons-codec:1.9' |
kaixiang.xia | 427418f | 2020-11-05 14:57:08 +0800 | [diff] [blame] | 42 | implementation 'org.bouncycastle:bcprov-jdk15to18:1.66' |
| 43 | implementation 'org.bouncycastle:bcpkix-jdk15on:1.66' |
kaixiang.xia | 03919bd | 2020-10-28 18:19:09 +0800 | [diff] [blame] | 44 | runtime 'org.slf4j:slf4j-parent:1.7.26' |
Xia Kaixiang | 80f1e9d | 2020-02-18 17:40:20 +0800 | [diff] [blame] | 45 | testImplementation 'junit:junit:4.12' |
| 46 | } |
| 47 | |
| 48 | jar { |
| 49 | enabled = true |
kaixiang.xia | 03919bd | 2020-10-28 18:19:09 +0800 | [diff] [blame] | 50 | baseName = "dlsmk-qrcode" |
Xia Kaixiang | 80f1e9d | 2020-02-18 17:40:20 +0800 | [diff] [blame] | 51 | manifest { |
kaixiang.xia | 03919bd | 2020-10-28 18:19:09 +0800 | [diff] [blame] | 52 | attributes('dlsmk-qrcode-version': sdkVersion) |
Xia Kaixiang | 80f1e9d | 2020-02-18 17:40:20 +0800 | [diff] [blame] | 53 | } |
| 54 | } |
| 55 | |
| 56 | publish.dependsOn(jar) |
binquan.qiuu | 6cf8c4f | 2020-07-08 11:17:48 +0800 | [diff] [blame] | 57 | |
| 58 | tasks.withType(JavaCompile) { |
| 59 | options.encoding = "UTF-8" |
| 60 | } |