Tang Cheng | 94cf0bb | 2019-07-08 13:12:50 +0800 | [diff] [blame] | 1 | plugins { |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 2 | id "java-library" |
| 3 | id "maven-publish" |
| 4 | id "org.springframework.boot" |
Tang Cheng | 73e2cad | 2019-07-10 09:30:23 +0800 | [diff] [blame] | 5 | } |
| 6 | |
Tang Cheng | f36d725 | 2019-12-17 14:14:50 +0800 | [diff] [blame] | 7 | jar { |
| 8 | enabled = true |
| 9 | archiveFileName = "${project.name}-${buildVersion}.${archiveExtension.getOrElse('.jar')}" |
| 10 | manifest { |
| 11 | attributes('Implementation-Title': project.name, |
| 12 | 'Implementation-Version': buildVersion) |
| 13 | } |
| 14 | } |
| 15 | println("Build Version: $buildVersion") |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 16 | bootJar { |
| 17 | enabled = false |
| 18 | } |
| 19 | |
| 20 | apply from: rootProject.file('gradle/swnx-publish.gradle') |
Tang Cheng | 73e2cad | 2019-07-10 09:30:23 +0800 | [diff] [blame] | 21 | |
| 22 | publishing { |
| 23 | publications { |
| 24 | mavenJava(MavenPublication) { |
Tang Cheng | 73e2cad | 2019-07-10 09:30:23 +0800 | [diff] [blame] | 25 | from components.java |
Tang Cheng | f36d725 | 2019-12-17 14:14:50 +0800 | [diff] [blame] | 26 | version = buildVersion |
Tang Cheng | 73e2cad | 2019-07-10 09:30:23 +0800 | [diff] [blame] | 27 | } |
| 28 | } |
Tang Cheng | 94cf0bb | 2019-07-08 13:12:50 +0800 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | dependencies { |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 32 | implementation "commons-beanutils:commons-beanutils:${beanutilsVersion}" |
| 33 | implementation "commons-codec:commons-codec:${codecVersion}" |
| 34 | implementation "org.apache.commons:commons-lang3:${lang3Version}" |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame^] | 35 | implementation "org.springframework:spring-web" |
| 36 | implementation group: 'io.swagger', name: 'swagger-annotations', version: swaggerVersion |
| 37 | |
| 38 | implementation "org.openapitools:jackson-databind-nullable:${openapitoolsVersion}" |
| 39 | |
Tang Cheng | d2c0a86 | 2019-07-09 16:30:30 +0800 | [diff] [blame] | 40 | |
Tang Cheng | 91ca277 | 2019-12-16 08:59:52 +0800 | [diff] [blame] | 41 | compileOnly "org.projectlombok:lombok:${lombokVersion}" |
| 42 | annotationProcessor "org.projectlombok:lombok:${lombokVersion}" |
Tang Cheng | f36d725 | 2019-12-17 14:14:50 +0800 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | |
| 46 | publish.dependsOn(jar) |