fix(gradlebuildconfig): add pom.xml & change swaggerV2 from runtime to compile for maven project (#438)

add new pom.xml generate task in jar task && change swaggerV2 from implementation to api
This commit is contained in:
qingmo
2022-04-26 14:34:27 +08:00
committed by GitHub
parent aeaab37c8a
commit ac22f63404
3 changed files with 8 additions and 1 deletions

2
.gitignore vendored
View File

@@ -6,3 +6,5 @@ build
/.classpath
/.project
/.settings/
*.ipr
*.iws

View File

@@ -35,6 +35,7 @@ ext {
configure(project.coreProjects) {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply from: "${rootDir}/publishing.gradle"
@@ -100,6 +101,10 @@ subprojects {
// exclude subprojects that don't produce a jar file or by design.
if (!project.name.equals('swagger2markup-bom') && !project.name.equals('swagger2markup-documentation')) {
jar {
into("META-INF/maven/$project.group/$project.name") {
from {generatePomFileForMavenJavaPublication}
rename ".*", "pom.xml"
}
inputs.property('moduleName', moduleName)
manifest.attributes(
'Automatic-Module-Name': moduleName

View File

@@ -28,7 +28,7 @@ dependencies {
implementation implLibraries.guava
implementation implLibraries.paleo
implementation implLibraries.slf4j
implementation implLibraries.swaggerV2
api implLibraries.swaggerV2
implementation implLibraries.vavr
testImplementation testLibraries.assertj
testImplementation testLibraries.assertjDiff