File tree Expand file tree Collapse file tree 2 files changed +26
-20
lines changed Expand file tree Collapse file tree 2 files changed +26
-20
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ subprojects {
31
31
}
32
32
33
33
publishing {
34
- publications {
35
- create<MavenPublication >(" maven" ) {
36
- groupId = " com.jongsoft.finance"
37
- version = System .getProperty(" version" )
38
- from(components[" java" ])
34
+ if (project.name != " fintrack-api" ) {
35
+ publications {
36
+ create<MavenPublication >(" maven" ) {
37
+ groupId = " com.jongsoft.finance"
38
+ version = System .getProperty(" version" )
39
+ from(components[" java" ])
40
+ }
39
41
}
40
42
}
41
43
Original file line number Diff line number Diff line change @@ -20,17 +20,6 @@ openApiGenerate {
20
20
skipValidateSpec.set(true )
21
21
}
22
22
23
- publishing {
24
- publications {
25
- create<MavenPublication >(" documentation" ) {
26
- groupId = " com.jongsoft.finance"
27
- artifactId = " api-docs"
28
- version = System .getProperty(" version" )
29
- artifacts.add(artifact(layout.buildDirectory.dir(" asciidoc" ).get().file(" index.adoc" )))
30
- }
31
- }
32
- }
33
-
34
23
val integration by sourceSets.creating
35
24
36
25
configurations[integration.implementationConfigurationName].extendsFrom(configurations.testImplementation.get())
@@ -53,12 +42,27 @@ tasks.jacocoTestReport {
53
42
tasks.check {
54
43
dependsOn(" itTest" )
55
44
}
56
- tasks.publishMavenPublicationToGitHubPackagesRepository {
57
- dependsOn(" openApiGenerate" )
45
+
46
+ tasks.withType<JavaCompile > {
47
+ finalizedBy(tasks.getByName(" openApiGenerate" ))
58
48
}
59
49
60
- tasks.compileJava {
61
- finalizedBy(tasks.openApiGenerate)
50
+ configurations {
51
+ create(" api-docs" )
52
+ }
53
+
54
+ val apiArtifact = artifacts.add(" api-docs" , layout.buildDirectory.file(" asciidoc/index.adoc" )) {
55
+ type = " asciidoc"
56
+ builtBy(tasks.getByName(" openApiGenerate" ))
57
+ }
58
+
59
+ publishing.publications {
60
+ create<MavenPublication >(" maven" ) {
61
+ groupId = " com.jongsoft.finance"
62
+ version = System .getProperty(" version" )
63
+ from(components[" java" ])
64
+ artifact(apiArtifact)
65
+ }
62
66
}
63
67
64
68
dependencies {
You can’t perform that action at this time.
0 commit comments