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