11plugins {
22 id ' io.spring.dependency-management' version ' 1.0.9.RELEASE'
33 id ' org.jetbrains.kotlin.jvm' version ' 1.3.72' apply false
4+ id ' org.sonarqube' version ' 2.8'
5+ id ' net.researchgate.release' version ' 2.8.1'
46 id ' java'
5- id " org.sonarqube" version " 2.8"
6- }
7-
8- allprojects {
9- group = ' org.springdoc'
10- version = ' 1.4.2-SNAPSHOT'
11- }
12-
13- repositories {
14- mavenLocal()
15- mavenCentral()
7+ id ' signing'
168}
179
1810ext {
@@ -22,11 +14,15 @@ ext {
2214}
2315
2416subprojects {
25-
26- apply plugin : ' java'
2717 apply plugin : ' java-library'
2818 apply plugin : ' maven-publish'
2919 apply plugin : ' io.spring.dependency-management'
20+ apply plugin : ' signing'
21+
22+ sourceCompatibility = JavaVersion . VERSION_1_8
23+ targetCompatibility = JavaVersion . VERSION_1_8
24+ compileJava. options. encoding = " UTF-8"
25+ compileTestJava. options. encoding = " UTF-8"
3026
3127 configurations {
3228 testImplementation. extendsFrom compileOnly
@@ -68,11 +64,14 @@ subprojects {
6864 useJUnitPlatform()
6965 }
7066
71- sourceCompatibility = ' 1.8'
67+ task sourcesJar(type : Jar ) {
68+ from sourceSets. main. allJava
69+ archiveClassifier = " sources"
70+ }
7271
73- java {
74- withSourcesJar()
75- withJavadocJar()
72+ task javadocJar( type : Jar ) {
73+ from sourceSets . main . allJava
74+ archiveClassifier = " javadoc "
7675 }
7776
7877 publishing {
@@ -104,13 +103,20 @@ subprojects {
104103 }
105104 }
106105
107- tasks . withType( JavaCompile ) {
108- options . encoding = ' UTF-8 '
106+ signing {
107+ sign publishing . publications . mavenJava
109108 }
110109}
111110
112111sonarqube {
113112 properties {
114113 property(" sonar.projectKey" , " springdoc_springdoc-openapi" )
115114 }
116- }
115+ }
116+
117+
118+ release {
119+ tagTemplate = ' v$version'
120+ }
121+
122+ afterReleaseBuild. dependsOn subprojects. publish
0 commit comments