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
488162db
Commit
488162db
authored
Mar 25, 2015
by
zhangkun83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gradle script to publish protoc binaries
parent
82524fe5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
0 deletions
+119
-0
build-protoc.sh
protoc-artifacts/build-protoc.sh
+8
-0
build.gradle
protoc-artifacts/build.gradle
+110
-0
settings.gradle
protoc-artifacts/settings.gradle
+1
-0
No files found.
protoc-artifacts/build-protoc.sh
0 → 100755
View file @
488162db
#!/bin/bash
# Override the default value set in configure.ac that has '-g' which produces
# huge binary.
export
CXXFLAGS
=
-DNDEBUG
cd
$(
dirname
"
$0
"
)
/..
&&
./configure
--disable-shared
&&
make
&&
cd
src
&&
(
strip protoc
||
strip protoc.exe
)
protoc-artifacts/build.gradle
View file @
488162db
apply
plugin:
'maven'
apply
plugin:
'java'
apply
plugin:
'osdetector'
apply
plugin:
'signing'
description
=
'Pre-compiled protoc (protobuf compiler) artifacts'
group
=
'com.google.protobuf'
version
=
'3.0.0-alpha-3-pre'
buildscript
{
repositories
{
mavenCentral
()
mavenLocal
()
}
dependencies
{
classpath
'com.google.gradle:osdetector-gradle-plugin:0.1.0-SNAPSHOT'
}
}
repositories
{
mavenCentral
()
mavenLocal
()
}
signing
{
sign
configurations
.
archives
}
def
artifactFile
=
'target/protoc.exe'
as
File
task
buildProtoc
(
type:
Exec
)
{
commandLine
'./build-protoc.sh'
}
task
prepareArtifact
(
type:
Copy
,
dependsOn:
buildProtoc
)
{
from
'../src/'
as
File
into
artifactFile
.
parent
include
'protoc'
,
'protoc.exe'
rename
'protoc'
,
'protoc.exe'
}
artifacts
{
archives
(
artifactFile
)
{
classifier
osdetector
.
classifier
type
"exe"
extension
"exe"
builtBy
prepareArtifact
}
}
uploadArchives
.
repositories
.
mavenDeployer
{
beforeDeployment
{
MavenDeployment
deployment
->
signing
.
signPom
(
deployment
)
}
repository
(
url:
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
)
{
if
(
rootProject
.
hasProperty
(
"ossrhUsername"
)
&&
rootProject
.
hasProperty
(
"ossrhPassword"
))
{
authentication
(
userName:
ossrhUsername
,
password:
ossrhPassword
)
}
}
snapshotRepository
(
url:
"https://oss.sonatype.org/content/repositories/snapshots/"
)
{
if
(
rootProject
.
hasProperty
(
"ossrhUsername"
)
&&
rootProject
.
hasProperty
(
"ossrhPassword"
))
{
authentication
(
userName:
ossrhUsername
,
password:
ossrhPassword
)
}
}
}
[
install
.
repositories
.
mavenInstaller
,
uploadArchives
.
repositories
.
mavenDeployer
,
]*.
pom
*.
whenConfigured
{
pom
->
pom
.
project
{
name
"$project.group:$project.name"
description
project
.
description
url
'https://github.com/google/protobuf'
scm
{
connection
'scm:svn:https://github.com/google/protobuf.git'
developerConnection
'scm:svn:git@github.com:google/protobuf.git'
url
'https://github.com/google/protobuf'
}
licenses
{
license
{
name
'BSD 3-Clause'
url
'http://opensource.org/licenses/BSD-3-Clause'
}
}
developers
{
developer
{
id
"com.google.protobuf"
name
"Protobuf Contributors"
email
"protobuf@googlegroups.com"
url
"https://github.com/google/protobuf"
organization
=
"Google, Inc."
organizationUrl
"https://www.google.com"
}
}
}
}
// Exe files are skipped by Maven by default. Override it.
[
install
.
repositories
.
mavenInstaller
,
uploadArchives
.
repositories
.
mavenDeployer
,
]*.
addFilter
(
'all'
)
{
artifact
,
file
->
true
}
task
wrapper
(
type:
Wrapper
)
{
gradleVersion
=
'2.0'
}
protoc-artifacts/settings.gradle
0 → 100644
View file @
488162db
rootProject
.
name
=
'protoc'
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