Skip to content

Commit

Permalink
fix(gradlebuildconfig): add pom.xml & change swaggerV2 from runtime t…
Browse files Browse the repository at this point in the history
…o compile for maven project (#438)

add new pom.xml generate task in jar task && change swaggerV2 from implementation to api
  • Loading branch information
qingmo authored Apr 26, 2022
1 parent aeaab37 commit ac22f63
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ build
/.classpath
/.project
/.settings/
*.ipr
*.iws
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion swagger2markup/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac22f63

Please sign in to comment.