Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
65858d51
Commit
65858d51
authored
Mar 30, 2015
by
zhangkun83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add README.md; Allow installing to local repo without OSSRH account and signature
parent
f1496fda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
README.md
protoc-artifacts/README.md
+38
-0
build.gradle
protoc-artifacts/build.gradle
+7
-2
No files found.
protoc-artifacts/README.md
0 → 100644
View file @
65858d51
# Build scripts that publish pre-compiled protoc artifacts
``protoc``
is the compiler for
``.proto``
files. It generates language bindings
for the messages and/or RPC services from
``.proto``
files.
Because
``protoc``
is a native executable, the scripts under this directory
build and publish a
``protoc``
executable (a.k.a. artifact) to Maven
repositories.
## Artifact name
The name of a published
``protoc``
artifact is in the following format:
``protoc-<version>-<os>-<arch>.exe``
, e.g.,
``protoc-3.0.0-alpha-3-windows-x86_64.exe``
.
## To install artifacts locally
The following command will install the
``protoc``
artifact to your local Maven repository.
```
$ ./gradlew install
```
## To push artifacts to Maven Central
Before you can upload artifacts to Maven Central repository, you must have
[
set
up your account with OSSRH](http://central.sonatype.org/pages/ossrh-guide.html),
and have
[
generated a PGP key
](
http://gradle.org/docs/current/userguide/signing_plugin.html
)
for siging. You need to put your account information and PGP key information
in
``$HOME/.gradle/gradle.properties``
, e.g.:
```
signing.keyId=24875D73
signing.password=secret
signing.secretKeyRingFile=/Users/me/.gnupg/secring.gpg
ossrhUsername=your-jira-id
ossrhPassword=your-jira-password
```
Use the following command to upload artifacts:
```
$ ./gradlew uploadArchives
```
protoc-artifacts/build.gradle
View file @
65858d51
...
...
@@ -22,6 +22,7 @@ repositories {
}
signing
{
required
false
sign
configurations
.
archives
}
...
...
@@ -51,11 +52,15 @@ uploadArchives.repositories.mavenDeployer {
beforeDeployment
{
MavenDeployment
deployment
->
signing
.
signPom
(
deployment
)
}
repository
(
url:
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
)
{
authentication
(
userName:
sonatypeUsername
,
password:
sonatypePassword
)
if
(
rootProject
.
hasProperty
(
"ossrhUsername"
)
&&
rootProject
.
hasProperty
(
"ossrhPassword"
))
{
authentication
(
userName:
sonatypeUsername
,
password:
sonatypePassword
)
}
}
snapshotRepository
(
url:
"https://oss.sonatype.org/content/repositories/snapshots/"
)
{
authentication
(
userName:
sonatypeUsername
,
password:
sonatypePassword
)
if
(
rootProject
.
hasProperty
(
"ossrhUsername"
)
&&
rootProject
.
hasProperty
(
"ossrhPassword"
))
{
authentication
(
userName:
sonatypeUsername
,
password:
sonatypePassword
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment