jackye1995 commented on a change in pull request #3743:
URL: https://github.com/apache/iceberg/pull/3743#discussion_r769109064
##########
File path: deploy.gradle
##########
@@ -24,105 +24,108 @@ if (project.hasProperty('release') && jdkVersion != '8') {
subprojects {
apply plugin: 'maven-publish'
apply plugin: 'signing'
+ afterEvaluate {
- task sourceJar(type: Jar, dependsOn: classes) {
- classifier = 'sources'
- from sourceSets.main.allSource
- group 'build'
- }
+ task sourceJar(type: Jar, dependsOn: classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+ group 'build'
+ }
- task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
- group 'build'
- }
+ task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+ group 'build'
+ }
- task testJar(type: Jar) {
- archiveClassifier = 'tests'
- from sourceSets.test.output
- }
+ task testJar(type: Jar) {
+ archiveClassifier = 'tests'
+ from sourceSets.test.output
+ }
- artifacts {
- archives sourceJar
- archives javadocJar
- archives testJar
- testArtifacts testJar
- }
+ artifacts {
+ archives sourceJar
+ archives javadocJar
+ archives testJar
+ testArtifacts testJar
+ }
- // add LICENSE and NOTICE
- [jar, sourceJar, javadocJar, testJar].each { task ->
- task.from(rootDir) {
- include 'LICENSE'
- include 'NOTICE'
+ // add LICENSE and NOTICE
+ [jar, sourceJar, javadocJar, testJar].each { task ->
+ task.from(rootDir) {
+ include 'LICENSE'
+ include 'NOTICE'
+ }
}
- }
- publishing {
- publications {
- apache(MavenPublication) {
- if (tasks.matching({task -> task.name == 'shadowJar'}).isEmpty()) {
- from components.java
- } else {
- project.shadow.component(it)
- }
+ publishing {
+ publications {
+ apache(MavenPublication) {
+ if (tasks.matching({task -> task.name == 'shadowJar'}).isEmpty()) {
+ from components.java
+ } else {
+ project.shadow.component(it)
+ }
- artifact sourceJar
- artifact javadocJar
- artifact testJar
+ artifact sourceJar
+ artifact javadocJar
+ artifact testJar
- versionMapping {
- allVariants {
- fromResolutionResult()
+ versionMapping {
+ allVariants {
+ fromResolutionResult()
+ }
}
- }
- groupId = 'org.apache.iceberg'
- pom {
- name = 'Apache Iceberg'
- description = 'A table format for huge analytic datasets'
- url = 'https://iceberg.apache.org'
- licenses {
- license {
- name = 'The Apache Software License, Version 2.0'
- url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ groupId = 'org.apache.iceberg'
+ pom {
+ name = 'Apache Iceberg'
+ description = 'A table format for huge analytic datasets'
+ url = 'https://iceberg.apache.org'
+ licenses {
+ license {
+ name = 'The Apache Software License, Version 2.0'
+ url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ }
}
- }
- mailingLists {
- mailingList {
- name = 'Dev Mailing List'
- post = '[email protected]'
- subscribe = '[email protected]'
- unsubscribe = '[email protected]'
+ mailingLists {
+ mailingList {
+ name = 'Dev Mailing List'
+ post = '[email protected]'
+ subscribe = '[email protected]'
+ unsubscribe = '[email protected]'
+ }
+ }
+ issueManagement {
+ system = 'GitHub'
+ url = 'https://github.com/apache/iceberg/issues'
}
- }
- issueManagement {
- system = 'GitHub'
- url = 'https://github.com/apache/iceberg/issues'
}
}
}
- }
- repositories {
- maven {
- credentials {
- username project.hasProperty('mavenUser') ? "$mavenUser" : ""
- password project.hasProperty('mavenPassword') ? "$mavenPassword" : ""
+ repositories {
+ maven {
+ credentials {
+ username project.hasProperty('mavenUser') ? "$mavenUser" : ""
+ password project.hasProperty('mavenPassword') ? "$mavenPassword" :
""
+ }
+ // upload to the releases repository using ./gradlew -Prelease
publish
+ def apacheSnapshotsRepoUrl =
'https://repository.apache.org/content/repositories/snapshots'
+ def apacheReleasesRepoUrl =
'https://repository.apache.org/service/local/staging/deploy/maven2'
+ def snapshotsRepoUrl = project.hasProperty('mavenSnapshotsRepo') ?
"$mavenSnapshotsRepo" : "$apacheSnapshotsRepoUrl"
+ def releasesRepoUrl = project.hasProperty('mavenReleasesRepo') ?
"$mavenReleasesRepo" : "$apacheReleasesRepoUrl"
+ url = project.hasProperty('release') ? releasesRepoUrl :
snapshotsRepoUrl
}
- // upload to the releases repository using ./gradlew -Prelease publish
- def apacheSnapshotsRepoUrl =
'https://repository.apache.org/content/repositories/snapshots'
- def apacheReleasesRepoUrl =
'https://repository.apache.org/service/local/staging/deploy/maven2'
- def snapshotsRepoUrl = project.hasProperty('mavenSnapshotsRepo') ?
"$mavenSnapshotsRepo" : "$apacheSnapshotsRepoUrl"
- def releasesRepoUrl = project.hasProperty('mavenReleasesRepo') ?
"$mavenReleasesRepo" : "$apacheReleasesRepoUrl"
- url = project.hasProperty('release') ? releasesRepoUrl :
snapshotsRepoUrl
}
}
- }
- if (project.hasProperty('release')) {
- signing {
- useGpgCmd()
- sign publishing.publications.apache
+ if (project.hasProperty('release')) {
+ signing {
+ useGpgCmd()
+ sign publishing.publications.apache
+ }
}
+
Review comment:
nit: extra space
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]