-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
164 lines (137 loc) · 5.06 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
plugins {
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'org.sonarqube' version '2.7'
id 'maven-publish'
id 'java'
id 'signing'
}
group = 'pro.axenix-innovation'
sourceCompatibility = '11'
targetCompatibility = '11'
compileJava.options.encoding = 'UTF-8'
tasks.withType(Javadoc) { options.encoding = "UTF-8" }
jar {
manifest {
attributes 'Version': archiveVersion,
'Build-time': new Date().format("dd-MM-yyyy'T'HH:mm:ss")
}
}
repositories {
mavenLocal()
mavenCentral()
}
subprojects {
version = rootProject.version
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:2.2.2.RELEASE"
}
}
dependencies {
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure
implementation 'org.springframework.boot:spring-boot-autoconfigure'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure
implementation 'org.springframework.boot:spring-boot-starter'
// https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
implementation 'org.springframework.kafka:spring-kafka'
implementation 'org.springframework.boot:spring-boot-starter-web'
// jms
implementation 'org.springframework:spring-jms'
implementation "javax.jms:javax.jms-api:2.0.1"
// lombok
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
// AspectJ
implementation 'org.aspectj:aspectjweaver:1.9.6'
// swagger annotations
// https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-common
implementation 'org.springdoc:springdoc-openapi-common:1.6.13'
// code generation
implementation 'com.squareup:javapoet:1.10.0'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
implementation 'com.fasterxml.jackson.core:jackson-core:2.14.0'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation 'org.apache.commons:commons-lang3:3.12.0'
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
java {
withJavadocJar()
withSourcesJar()
}
String nexus_user = System.getenv('NEXUS_USER')
String nexus_password = System.getenv('NEXUS_PASSWORD')
String sonatype_nexus_user = System.getenv('SONATYPE_NEXUS_USER')
String sonatype_nexus_password = System.getenv('SONATYPE_NEXUS_PASSWORD')
String repoURL = ""
String sonatypeRepoURL = ""
if (version.endsWith('-SNAPSHOT')) {
repoURL = System.getenv('NEXUS_SERVER_URL_SNAPSHOT').toString()
sonatypeRepoURL = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
} else {
repoURL = System.getenv('NEXUS_SERVER_URL_RELEASE').toString()
sonatypeRepoURL = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
sign publishing.publications
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.name
groupId project.group
version version
from components.java
pom {
name = 'AxenAPI'
description = 'Library for generation Spring conrollers by consumers (kafka consumers and other) with Swagger annotations. After that you can use it in your project and use Swagger UI.'
url = 'https://github.com/AxenAPI/axenapi-library'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = "axenix-innovation"
name = "AxenAPI-Generator Contributors"
email = "[email protected]"
}
scm {
url = "https://github.com/AxenAPI/axenapi-library"
connection = "scm:git:git://github.com/AxenAPI/axenapi-library.git"
developerConnection = "scm:git:ssh://[email protected]:AxenAPI/axenapi-library.git"
}
issueManagement {
system = "GitHub"
url = "https://github.com/AxenAPI/axenapi-library/issues"
}
}
}
}
}
repositories {
maven {
allowInsecureProtocol = true
url repoURL
credentials.setUsername(nexus_user)
credentials.setPassword(nexus_password)
}
maven {
allowInsecureProtocol = true
url sonatypeRepoURL
credentials.setUsername(sonatype_nexus_user)
credentials.setPassword(sonatype_nexus_password)
}
}
}