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 | |
| 10 | def sdkVersion = gitVersion() |
| 11 | sourceCompatibility = 1.8 |
| 12 | targetCompatibility = 1.8 |
| 13 | |
| 14 | publishing { |
| 15 | publications { |
| 16 | mavenJava(MavenPublication) { |
| 17 | groupId = project.group |
| 18 | artifactId = 'bus-qrcode' |
| 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" |
| 39 | implementation 'com.eatthepath:java-otp:0.1.0' |
| 40 | implementation 'org.slf4j:slf4j-api:1.7.25' |
| 41 | implementation 'commons-codec:commons-codec:1.9' |
| 42 | runtime 'org.slf4j:slf4j-parent:1.7.25' |
| 43 | runtime 'org.slf4j:slf4j-simple:1.7.25' |
| 44 | testImplementation 'junit:junit:4.12' |
| 45 | } |
| 46 | |
| 47 | jar { |
| 48 | enabled = true |
| 49 | baseName = "bus-qrcode" |
| 50 | manifest { |
| 51 | attributes('Bus-QRcode-Version': sdkVersion) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | publish.dependsOn(jar) |
binquan.qiuu | 6cf8c4f | 2020-07-08 11:17:48 +0800 | [diff] [blame] | 56 | |
| 57 | tasks.withType(JavaCompile) { |
| 58 | options.encoding = "UTF-8" |
| 59 | } |