github.com/yoheimuta/protolint@v0.49.8-0.20240515023657-4ecaebb7575d/build.gradle (about)

     1  plugins {
     2      id 'maven-publish'
     3      id 'signing'
     4  }
     5  
     6  group = 'io.github.yoheimuta'
     7  
     8  publishing {
     9      publications {
    10          maven(MavenPublication) {
    11              groupId = 'io.github.yoheimuta'
    12              artifactId = rootProject.name
    13              version = System.getenv("GITHUB_REF_NAME")
    14              // Strip "v" from version number
    15              if (version.startsWith("v")) {
    16                  version = version.substring(1)
    17              }
    18  
    19              pom {
    20                  name = groupId + ':' + rootProject.name
    21                  description = 'protolint is the pluggable linting/fixing utility for Protocol Buffer files (proto2+proto3)'
    22                  url = 'https://github.com/yoheimuta/protolint'
    23                  licenses {
    24                      license {
    25                          name = 'MIT License'
    26                          url = 'https://github.com/yoheimuta/protolint/blob/master/LICENSE'
    27                      }
    28                  }
    29                  developers {
    30                      developer {
    31                          id = 'yoheimuta'
    32                          name = 'yohei yoshimuta'
    33                          email = 'yoheimuta@gmail.com'
    34                      }
    35                  }
    36                  scm {
    37                      connection = 'scm:git:git@github.com:yoheimuta/protolint.git'
    38                      developerConnection = 'scm:git:git@github.com:yoheimuta/protolint.git'
    39                      url = 'https://github.com/yoheimuta/protolint'
    40                  }
    41              }
    42  
    43              //linux 64 arm
    44              artifact("$projectDir/dist/protoc-gen-protolint_linux_arm64/protoc-gen-protolint") {
    45                  classifier 'linux-aarch_64'
    46                  extension 'exe'
    47              }
    48              //linux 64 intel
    49              artifact("$projectDir/dist/protoc-gen-protolint_linux_amd64_v1/protoc-gen-protolint") {
    50                  classifier 'linux-x86_64'
    51                  extension 'exe'
    52              }
    53              //mac 64 arm
    54              artifact("$projectDir/dist/protoc-gen-protolint_darwin_arm64/protoc-gen-protolint") {
    55                  classifier 'osx-aarch_64'
    56                  extension 'exe'
    57              }
    58              //mac 64 intel
    59              artifact("$projectDir/dist/protoc-gen-protolint_darwin_amd64_v1/protoc-gen-protolint") {
    60                  classifier 'osx-x86_64'
    61                  extension 'exe'
    62              }
    63              //windows 64 arm
    64              artifact("$projectDir/dist/protoc-gen-protolint_windows_arm64/protoc-gen-protolint.exe") {
    65                  classifier 'windows-aarch_64'
    66                  extension 'exe'
    67              }
    68              //windows 64 intel
    69              artifact("$projectDir/dist/protoc-gen-protolint_windows_amd64_v1/protoc-gen-protolint.exe") {
    70                  classifier 'windows-x86_64'
    71                  extension 'exe'
    72              }
    73          }
    74      }
    75  
    76      repositories {
    77          maven {
    78              name = "OSSRH"
    79              def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
    80              def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
    81              url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
    82              credentials {
    83                  username = System.getenv("MAVEN_USERNAME")
    84                  password = System.getenv("MAVEN_PASSWORD")
    85              }
    86          }
    87      }
    88  }
    89  
    90  signing {
    91      def signingKey = project.getProperty('signingKey')
    92      def signingPassword = project.getProperty('signingPassword')
    93      useInMemoryPgpKeys(signingKey, signingPassword)
    94      sign publishing.publications.maven
    95  }