github.com/apache/beam/sdks/v2@v2.48.2/java/bom/common.gradle (about)

     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one
     3   * or more contributor license agreements.  See the NOTICE file
     4   * distributed with this work for additional information
     5   * regarding copyright ownership.  The ASF licenses this file
     6   * to you under the Apache License, Version 2.0 (the
     7   * License); you may not use this file except in compliance
     8   * with the License.  You may obtain a copy of the License at
     9   *
    10   *     http://www.apache.org/licenses/LICENSE-2.0
    11   *
    12   * Unless required by applicable law or agreed to in writing, software
    13   * distributed under the License is distributed on an AS IS BASIS,
    14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    15   * See the License for the specific language governing permissions and
    16   * limitations under the License.
    17   */
    18  
    19  apply plugin: 'org.apache.beam.module'
    20  apply plugin: 'maven-publish'
    21  apply plugin: 'java-platform'
    22  // plugin to support repository authentication via ~/.m2/settings.xml
    23  // https://github.com/mark-vieira/gradle-maven-settings-plugin/
    24  project.apply plugin: 'net.linguica.maven-settings'
    25  
    26  javaPlatform {
    27      allowDependencies()
    28  }
    29  
    30  def isRelease(Project project) {
    31      return project.hasProperty('isRelease')
    32  }
    33  
    34  publishing {
    35      publications {
    36          mavenJava(MavenPublication) {
    37              groupId = project.mavenGroupId
    38              artifactId = archivesBaseName
    39              version = project.version
    40              pom {
    41                  name = project.description
    42                  if (project.hasProperty("summary")) {
    43                      description = project.summary
    44                  }
    45                  url = "https://beam.apache.org"
    46                  inceptionYear = "2016"
    47                  licenses {
    48                      license {
    49                          name = "Apache License, Version 2.0"
    50                          url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
    51                          distribution = "repo"
    52                      }
    53                  }
    54                  scm {
    55                      connection = "scm:git:https://gitbox.apache.org/repos/asf/beam.git"
    56                      developerConnection = "scm:git:https://gitbox.apache.org/repos/asf/beam.git"
    57                      url = "https://gitbox.apache.org/repos/asf?p=beam.git;a=summary"
    58                  }
    59                  issueManagement {
    60                      system = "github"
    61                      url = "https://github.com/apache/beam/issues"
    62                  }
    63                  mailingLists {
    64                      mailingList {
    65                          name = "Beam Dev"
    66                          subscribe = "dev-subscribe@beam.apache.org"
    67                          unsubscribe = "dev-unsubscribe@beam.apache.org"
    68                          post = "dev@beam.apache.org"
    69                          archive = "https://www.mail-archive.com/dev@beam.apache.org"
    70                      }
    71                      mailingList {
    72                          name = "Beam User"
    73                          subscribe = "user-subscribe@beam.apache.org"
    74                          unsubscribe = "user-unsubscribe@beam.apache.org"
    75                          post = "user@beam.apache.org"
    76                          archive = "https://www.mail-archive.com/user@beam.apache.org"
    77                      }
    78                      mailingList {
    79                          name = "Beam Commits"
    80                          subscribe = "commits-subscribe@beam.apache.org"
    81                          unsubscribe = "commits-unsubscribe@beam.apache.org"
    82                          post = "commits@beam.apache.org"
    83                          archive = "https://www.mail-archive.com/commits@beam.apache.org"
    84                      }
    85                  }
    86                  developers {
    87                      developer {
    88                          name = "The Apache Beam Team"
    89                          email = "dev@beam.apache.org"
    90                          url = "https://beam.apache.org"
    91                          organization = "Apache Software Foundation"
    92                          organizationUrl = "https://www.apache.org"
    93                      }
    94                  }
    95              }
    96  
    97              pom.withXml {
    98                  def elem = asElement()
    99                  def hdr = elem.getOwnerDocument().createComment(
   100                          '''
   101      Licensed to the Apache Software Foundation (ASF) under one or more
   102      contributor license agreements.  See the NOTICE file distributed with
   103      this work for additional information regarding copyright ownership.
   104      The ASF licenses this file to You under the Apache License, Version 2.0
   105      (the "License"); you may not use this file except in compliance with
   106      the License.  You may obtain a copy of the License at
   107        http://www.apache.org/licenses/LICENSE-2.0
   108      Unless required by applicable law or agreed to in writing, software
   109      distributed under the License is distributed on an "AS IS" BASIS,
   110      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   111      See the License for the specific language governing permissions and
   112      limitations under the License.
   113  ''')
   114                  elem.insertBefore(hdr, elem.getFirstChild())
   115              }
   116  
   117              from components.javaPlatform
   118          }
   119      }
   120  
   121      repositories project.ext.repositories
   122  }
   123  
   124  // Only sign artifacts if we are performing a release
   125  if (isRelease(project) && !project.hasProperty('noSigning')) {
   126      apply plugin: "signing"
   127      signing {
   128          useGpgCmd()
   129          sign publishing.publications
   130      }
   131  }