1-
21// //////////////////////////////////////////////////////////////////////////////////////////
32// This file is generated by Speakeasy and any edits will be lost in generation updates.
43//
98// of string where each string value is an additional line in the block) in gen.yaml.
109// //////////////////////////////////////////////////////////////////////////////////////////
1110
11+
1212plugins {
1313 // Apply the java-library plugin for API and implementation separation.
1414 id ' java-library'
1515 id ' maven-publish'
1616 id ' signing'
17+ // V2 publishing plugin (Sonatype Central Portal)
1718 id ' cl.franciscosolis.sonatype-central-upload' version ' 1.0.3'
19+ id " io.spring.dependency-management" version " 1.1.6" apply false
1820}
1921
2022compileJava. options. encoding = " UTF-8"
@@ -27,27 +29,22 @@ repositories {
2729}
2830
2931java {
30- sourceCompatibility = JavaVersion . VERSION_11
31- targetCompatibility = JavaVersion . VERSION_11
3232 withSourcesJar()
3333 withJavadocJar()
3434}
3535
36- model {
37- tasks. generatePomFileForMavenPublication {
38- destination = file(" $buildDir /pom.xml" )
39- }
40- }
41-
4236version = " ${ version} "
4337group = " ${ groupId} "
4438
4539jar {
46- dependsOn( " : generatePomFileForMavenPublication" )
40+ dependsOn ' generatePomFileForMavenPublication'
4741 archiveBaseName = " ${ artifactId} "
4842
4943 into(" META-INF/maven/com.airbyte/api" ) {
50- from(" $buildDir /pom.xml" )
44+ from(layout. buildDirectory. file(" pom.xml" )) {
45+ // Only include if it exists to avoid build ordering issues
46+ duplicatesStrategy = DuplicatesStrategy . INCLUDE
47+ }
5148 }
5249}
5350
@@ -60,101 +57,86 @@ javadoc {
6057 options. addStringOption(' Xdoclint:none' , ' -quiet' )
6158}
6259
63- tasks. withType(Javadoc ) {
64- failOnError false
60+ tasks. withType(Javadoc ). configureEach {
61+ failOnError = false
6562 options. addStringOption(' Xdoclint:none' , ' -quiet' )
6663}
6764
65+ tasks. withType(JavaCompile ). configureEach {
66+ options. release = 11
67+ }
68+
6869sourcesJar {
6970 archiveBaseName = " ${ artifactId} "
7071}
7172
7273javadocJar {
7374 archiveBaseName = " ${ artifactId} "
7475}
75- sonatypeCentralUpload {
76- // This is your Sonatype generated username
77- username = System . getenv(" SONATYPE_USERNAME" )
78- // This is your sonatype generated password
79- password = System . getenv(" SONATYPE_PASSWORD" )
80-
81- // This is a list of files to upload. Ideally you would point to your jar file, source and javadoc jar (required by central)
82- archives = files(
83- " $buildDir /libs/${ artifactId} -${ version} .jar" ,
84- " $buildDir /libs/${ artifactId} -${ version} -sources.jar" ,
85- " $buildDir /libs/${ artifactId} -${ version} -javadoc.jar"
86- )
87-
88- // This is the pom file to upload. This is required by central
89- pom = file(" $buildDir /pom.xml" )
90-
91- // This is your PGP private key. This is required to sign your files
92- signingKey = System . getenv(" SONATYPE_SIGNING_KEY" )
93- // This is your PGP private key passphrase to decrypt your private key
94- signingKeyPassphrase = System . getenv(" SIGNING_KEY_PASSPHRASE" )
76+
77+ dependencies {
78+ api ' com.fasterxml.jackson.core:jackson-annotations:2.18.2'
79+ implementation ' com.fasterxml.jackson.core:jackson-databind:2.18.2'
80+ implementation ' com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2'
81+ implementation ' com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2'
82+ api(' org.openapitools:jackson-databind-nullable:0.2.6' ) {exclude group : ' com.fasterxml.jackson.core' , module : ' jackson-databind' }
83+ implementation ' commons-io:commons-io:2.18.0'
84+ implementation ' jakarta.annotation:jakarta.annotation-api:3.0.0'
85+ api ' org.reactivestreams:reactive-streams:1.0.4'
9586}
9687
88+ ext {
89+ springBootVersion = ' 2.7.18'
90+ }
9791
98- publishing {
99-
100- publications {
101- maven(MavenPublication ) {
102- // note that properties can't yet be used below!
103- // https://github.com/gradle/gradle/issues/18619
104- groupId = " com.airbyte"
105- artifactId = " api"
106- version = " 2.0.0"
107-
108- from components. java
109-
110- pom {
111- name = ' Airbyte Java SDK'
112- description = ' SDK enabling Java developers to easily integrate with the Airbyte API.'
113- url = ' https://github.com/airbytehq/airbyte-api-java-sdk'
114- scm {
115- url = ' github.com/airbytehq/airbyte-api-java-sdk'
116- connection = ' scm:git:ssh://git@github.com/airbytehq/airbyte-api-java-sdk.git'
117- }
118- licenses {
119- license {
120- name = ' The MIT License (MIT)'
121- url = ' https://mit-license.org/'
122- }
123- }
124- developers {
125- developer {
126- name = ' Airbyte'
127- organization = ' Airbyte'
128- email = ' info@airbyte.com'
129- }
130- }
131- organization {
132- name = ' Airbyte'
133- url = ' www.airbyte.com'
134- }
92+ subprojects {
93+ if (name in [
94+ ' api-spring-boot-autoconfigure' ,
95+ ' api-spring-boot-starter'
96+ ]) {
97+ // Ensure subprojects use the same group and version as root project
98+ group = rootProject. group
99+ version = rootProject. version
100+
101+ apply {
102+ plugin " java-library"
103+ plugin " io.spring.dependency-management"
104+ plugin " maven-publish"
105+ plugin " signing"
106+ plugin " cl.franciscosolis.sonatype-central-upload"
107+ }
108+ dependencyManagement {
109+ imports {
110+ mavenBom " org.springframework.boot:spring-boot-dependencies:${ rootProject.springBootVersion} "
135111 }
136112 }
137- }
138- }
113+ repositories {
114+ mavenCentral()
115+ }
116+ java {
117+ withSourcesJar()
118+ withJavadocJar()
119+ }
120+ tasks. withType(JavaCompile ). configureEach {
121+ options. release = 11
122+ }
139123
140- if (! project. hasProperty(' skip.signing' )) {
141- signing {
142- def signingKey = findProperty(" signingKey" )
143- def signingPassphrase = findProperty(" signingPassphrase" )
144- useInMemoryPgpKeys(signingKey, signingPassphrase)
145- sign publishing. publications. maven
124+ // Apply publishing configuration to all subprojects - they'll check for publishingConfig internally
125+ apply from : rootProject. file(' publishing.gradle' )
146126 }
147127}
148128
149-
150-
151- dependencies {
152- api ' com.fasterxml.jackson.core:jackson-annotations:2.18.2 '
153- implementation ' com.fasterxml.jackson.core:jackson-databind:2.18.2 '
154- implementation ' com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2 '
155- implementation ' com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2 '
156- api( ' org.openapitools:jackson-databind-nullable:0.2.6 ' ) {exclude group : ' com.fasterxml.jackson.core ' , module : ' jackson-databind ' }
157- implementation ' commons-io:commons-io:2.18.0 '
129+ ext {
130+ publishingConfig = [
131+ groupId : group,
132+ artifactId : artifactId,
133+ version : version,
134+ name : " Airbyte Java SDK " ,
135+ description : " SDK enabling Java developers to easily integrate with the Airbyte API. " ,
136+ publicationName : " maven "
137+ ]
158138}
159139
160- apply from : ' build-extras.gradle'
140+ apply from : ' publishing.gradle'
141+
142+ apply from : ' build-extras.gradle'
0 commit comments