1
1
plugins {
2
2
id ' io.spring.dependency-management' version ' 1.0.9.RELEASE'
3
3
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'
4
6
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'
16
8
}
17
9
18
10
ext {
@@ -22,11 +14,15 @@ ext {
22
14
}
23
15
24
16
subprojects {
25
-
26
- apply plugin : ' java'
27
17
apply plugin : ' java-library'
28
18
apply plugin : ' maven-publish'
29
19
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"
30
26
31
27
configurations {
32
28
testImplementation. extendsFrom compileOnly
@@ -68,11 +64,14 @@ subprojects {
68
64
useJUnitPlatform()
69
65
}
70
66
71
- sourceCompatibility = ' 1.8'
67
+ task sourcesJar(type : Jar ) {
68
+ from sourceSets. main. allJava
69
+ archiveClassifier = " sources"
70
+ }
72
71
73
- java {
74
- withSourcesJar()
75
- withJavadocJar()
72
+ task javadocJar( type : Jar ) {
73
+ from sourceSets . main . allJava
74
+ archiveClassifier = " javadoc "
76
75
}
77
76
78
77
publishing {
@@ -104,13 +103,20 @@ subprojects {
104
103
}
105
104
}
106
105
107
- tasks . withType( JavaCompile ) {
108
- options . encoding = ' UTF-8 '
106
+ signing {
107
+ sign publishing . publications . mavenJava
109
108
}
110
109
}
111
110
112
111
sonarqube {
113
112
properties {
114
113
property(" sonar.projectKey" , " springdoc_springdoc-openapi" )
115
114
}
116
- }
115
+ }
116
+
117
+
118
+ release {
119
+ tagTemplate = ' v$version'
120
+ }
121
+
122
+ afterReleaseBuild. dependsOn subprojects. publish
0 commit comments